• Breaking News

    Tuesday, November 16, 2021

    Android Dev - Weekly Questions Thread - November 16, 2021

    Android Dev - Weekly Questions Thread - November 16, 2021


    Weekly Questions Thread - November 16, 2021

    Posted: 16 Nov 2021 06:00 AM PST

    This thread is for simple questions that don't warrant their own thread (although we suggest checking the sidebar, the wiki, our Discord, or Stack Overflow before posting). Examples of questions:

    • How do I pass data between my Activities?
    • Does anyone have a link to the source for the AOSP messaging app?
    • Is it possible to programmatically change the color of the status bar without targeting API 21?

    Large code snippets don't read well on reddit and take up a lot of space, so please don't paste them in your comments. Consider linking Gists instead.

    Have a question about the subreddit or otherwise for /r/androiddev mods? We welcome your mod mail!

    Also, please don't link to Play Store pages or ask for feedback on this thread. Save those for the App Feedback threads we host on Saturdays.

    Looking for all the Questions threads? Want an easy way to locate this week's thread? Click this link!

    submitted by /u/AutoModerator
    [link] [comments]

    Release Kotlin 1.6.0 · JetBrains/kotlin

    Posted: 16 Nov 2021 01:03 AM PST

    Why aab and apk file works differently?

    Posted: 16 Nov 2021 08:11 AM PST

    I have created an app a year ago and uploaded the apk file to google play, I recently updated the code base and uploaded the aab file to google play(since aab is the only supported format). The problem is the application installed via adb works as expected, generated apk also works fine, even apk extracted from aab also works fine but, the application installed from google play is not working as expected.

    Actual problem is Language change using Shared preference is not working, Only one language is displaying while changing to other languages

    submitted by /u/krisho7
    [link] [comments]

    Google Play store question !

    Posted: 16 Nov 2021 05:22 AM PST

    Hello,
    I'm an android developer and i have a question related to posting apps on the google play store
    I have a developer account on google play and i have been asked to publish someone's app on it, is it risky to post it on my google play account ? (is it a scam )

    submitted by /u/ImadToumi
    [link] [comments]

    Android Studio hexagon shaped keyboard keys

    Posted: 16 Nov 2021 10:00 AM PST

    Hi,

    I am trying to make a keyboard with hexagon shaped keys. I made hexagon shaped Drawable. Can I change the shape of the keyboard key to a hexagon shape or make a keyboard where keys are ImageViewws? I am using Keyboard class.

    Best regards,

    Leo

    submitted by /u/leodomitrovic
    [link] [comments]

    Wear OS app "This app is not available for any of your devices" in Google Play

    Posted: 15 Nov 2021 09:24 PM PST

    I just published a Wear OS app to Google Play, however I'm getting the error mentioned in the title when I go to the Play Store from the Developer Console even though Play can see my Wear OS watch (Galaxy Watch 4). I cannot find the app in the Play Store when searching from the watch or phone. Please help?

    Update: I figured it out. In "Setup/Advanced settings/Release types" in the web browser version of Play Developer Console, you have to opt in for Wear OS. You'll need to have at least one Wear OS picture uploaded to opt in. Google will then review the app against their Wear OS checklist, and will make it available for watches if it passes, or notify you if it doesn't. Here's more information: https://developer.android.com/distribute/best-practices/launch/distribute-wear

    submitted by /u/mcfasa09
    [link] [comments]

    I need your help, what is the best way to edit a video (frame by frame)

    Posted: 16 Nov 2021 06:04 AM PST

    Hi, I'm really lost now, I've spent a lot of time looking for the best way to edit a video frame by frame, I'm using an ML SDK to detect a face in the picture, unfortunately, this SDK supports bitmap as input only, now, I'm trying to make it work with video as well, right now, I'm doing this :

    1 - Extract frame by frame using MediaMetadataRetriever

    2 - When the frame is extracted, I pass it to the SDK to detect the face

    3 - When the SDK return result as bitmap, I add this bitmap to a queue in order to make a new video using MediaCodec

    Everything works fine, but it takes some time to finish, is there any good way to make this?

    Massive thanks for your suggestions & help.

    submitted by /u/Heromimox
    [link] [comments]

    Firebase Realtime Database Listeners and MVVM

    Posted: 16 Nov 2021 09:48 AM PST

    So for my senior project I have an app using the realtime database as my remote database and I'm trying to stick to the MVVM architecture. So I'm splitting everything up into the corresponding views, view model's, and then a repository.

    Now if I put a child listener in my repository, say in some function or w/e, do I have to call that function for the data to be changed? I know it's a listener so it listens for changes to whatever I'm listening on, but I'm unsure if the listener will always be listening, in a function or not. Or does the listener not do anything unless it's in for example the onCreate function in an activity.

    I've been stuck on this for a little while now, I have almost all the functionality I'm looking for but I have a lot of it in my view model and my actual view. Which is what I'm trying to stay away from - I'm really trying to stick to the "separation of concerns" model, and follow what any real world android developer may follow.

    Any advice or insight would be appreciated, this is all totally new to me and have been slowly teaching myself over the semester.

    submitted by /u/whatarewii
    [link] [comments]

    how i can add chat /forum to my app ?

    Posted: 16 Nov 2021 09:07 AM PST

    hey

    we have school project to build app

    we want to add to the app the ability to chat whit other use ( not is main role)

    any guide u can direct me to ?

    submitted by /u/moshemaman25
    [link] [comments]

    Is firebase firestore a good choice for social media app?

    Posted: 16 Nov 2021 04:49 AM PST

    Does it have queries for viewing posts only posted by our friends or public posts & not the ones from those we have blocked? It is also planned to move older posts to MySQL.

    submitted by /u/jaroos_
    [link] [comments]

    Does anyone have a simple workable example on exporting PDF from a print preview page?

    Posted: 16 Nov 2021 12:43 AM PST

    Does anyone have a simple workable example on exporting PDF from a print preview page?

    I have written a simple print preview page, using webview and simple HTML.

    I can get the print preview page without issue.

    However, the built-in exporting PDF doesn't work as expected. As, the saved PDF is always a 0 size PDF file.

    I was wondering, does anyone have a simple workable example on exporting PDF from a print preview page?

    Here's my imperfect code.

    public class PrintLauncherFragmentActivity extends AppCompatActivity { private WebView mWebView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // https://developer.android.com/training/printing/html-docs // Create a WebView object specifically for printing WebView webView = new WebView(this); webView.setWebViewClient(new WebViewClient() { public boolean shouldOverrideUrlLoading(WebView view, String url) { return false; } @Override public void onPageFinished(WebView view, String url) { createWebPrintJob(view); mWebView = null; } }); String htmlDocument = "<html><body><h1>Test Content</h1><p>Testing, " + "testing, testing...</p></body></html>"; webView.loadDataWithBaseURL(null, htmlDocument, "text/HTML", "UTF-8", null); // Keep a reference to WebView object until you pass the PrintDocumentAdapter // to the PrintManager mWebView = webView; } private void createWebPrintJob(WebView webView) { // Get a PrintManager instance PrintManager printManager = (PrintManager) this .getSystemService(Context.PRINT_SERVICE); String jobName = "demo"; // Get a print adapter instance PrintDocumentAdapter printAdapter = webView.createPrintDocumentAdapter(jobName); // Create a print job with name and adapter instance PrintJob printJob = printManager.print(jobName, printAdapter, new PrintAttributes.Builder().build()); // Save the job object for later status checking //printJobs.add(printJob); } } 

    Things look good on print preview page

    https://preview.redd.it/g4s9z72v6xz71.png?width=1080&format=png&auto=webp&s=62e9ae10d88284ffed4ec3f82e4dd306873df091

    However, when I try to save a PDF file to Download using the top right button in print preview page, it always produce a 0 size invalid PDF file.

    https://preview.redd.it/vo2weyw07xz71.png?width=1080&format=png&auto=webp&s=4836148c7d668c28138ae3047fa9f4cfd6f57262

    Does anyone know why and how I can avoid such?

    Note, I have already allowed Files and media permission

    https://preview.redd.it/kia41gm37xz71.png?width=1080&format=png&auto=webp&s=58708fd4467f7d4576c31a3ddb2833ba8a632c20

    Thank you for your help!

    submitted by /u/yccheok
    [link] [comments]

    BLE logging temperature sensor

    Posted: 16 Nov 2021 04:25 AM PST

    I'm looking for an app which can log the temperature from a BLE temperature sensor. While there are many apps (e.g. nRF connect) where I can successfully access/read my temperature (manually or by BLE notification), I haven't found one which allowed me to log the values to e.g. a csv file (or any other file format).

    The sensor is something I did myself, which just uses the environment profile (service UUID = 0x181a, characteristic UUID = 2a6e). Because I did it myself, I could adjust it to a specific app.

    submitted by /u/galeactena
    [link] [comments]

    Android Studio err: "an error occurred while trying to compute required packages"!

    Posted: 16 Nov 2021 02:12 AM PST

    I do have the sdk already installed and everything was working fine until I uninstalled Android Studio and reinstalled it again!

    submitted by /u/Lost_Rain7132
    [link] [comments]

    How to Implement Awesome Push Notifications Plugin Using Flutter?

    Posted: 16 Nov 2021 01:14 AM PST

    Recruiter reached out to me for a phone call, what should I expect?

    Posted: 15 Nov 2021 04:26 PM PST

    For some background, I applied for an android dev role that requires 1+ years of experience, even though I don't have any professional experience, and I got a message from a recruiter to talk more about the position. What should I expect from this call, and is there anything that I should prepare for?

    submitted by /u/hitoridev
    [link] [comments]

    Put on your tin foil hat before reading

    Posted: 15 Nov 2021 05:05 PM PST

    I know there's going to be people that called me a liar or an idiot but that would probably happen no matter what I said because this is the wild wild web but I'm pretty sure they'll probably also be a couple of people seeing this that could relate to me. You know what I hate? I hate that Google Will put up an invisible wall over a button that they don't think I should push from my phone. Just part of what I'm writing this is wanting someone to clear up exactly who is blocking it and you can put this button I just always assumed it was Google but I guess it should be somebody else. For the non-believers I would like to show you the screenshot for an app they sell under the Play store.

    submitted by /u/NachoCh33z3
    [link] [comments]

    No comments:

    Post a Comment