• Breaking News

    Tuesday, September 14, 2021

    Android Dev - Weekly Questions Thread - September 14, 2021

    Android Dev - Weekly Questions Thread - September 14, 2021


    Weekly Questions Thread - September 14, 2021

    Posted: 14 Sep 2021 06:00 AM PDT

    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]

    Received this email from "European Commission". How legitimate is it?

    Posted: 14 Sep 2021 05:07 AM PDT

    Java 17 / JDK 17: General Availability

    Posted: 14 Sep 2021 07:56 AM PDT

    Mejiboard - An image board client based on Gelbooru for android, made from Jetpack Compose

    Posted: 14 Sep 2021 07:41 AM PDT

    Mejiboard - An image board client based on Gelbooru for android, made from Jetpack Compose

    So i have learned Jetpack Compose for several weeks now and i've finally release my first open source app from android development.
    It uses MVVM and Hilt for dependency injection.

    Link: Github

    Let me know of what you guys thinking! any constructive feedback is highly appreciated.

    Here's a screenshot of the main screen

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

    Do you build for / submit to alternative app stores? (AppGallery, Galaxy Apps, Amazon Appstore, etc) Why (not)?

    Posted: 14 Sep 2021 05:23 AM PDT

    Prepping for an interview recently, I noticed that a Bitrise user had started using a 'Deploy to App Gallery' step a year ago, and managed to rack up 3,000,000+ App Gallery downloads in the mean time. Digging a bit deeper, most developers that started deploying to App Gallery found 10,000+, 100,000+ or even 1,000,000+ installs there.

    Do people generally go through the trouble of building for (and submitting) the bigger alternative Android stores? If so, what are your experiences?

    Disclaimer: I work at Bitrise, where I ran across this particular developer

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

    Understand Gradle In Half An Hour

    Posted: 14 Sep 2021 08:43 AM PDT

    What are some good way to install APK into emulator?

    Posted: 14 Sep 2021 03:58 AM PDT

    What are some good way to install APK into emulator?

    Currently, I need to run a few APKs in emulator, because I need to exam their behaviour in older Android (API 27)

    What I do is I

    • Launch the emulator from Android Studio
    • Drag and drop the APK, from computer Desktop to emulator

    However, the progress window just keep animating without stop

    https://preview.redd.it/lj5i4nwp9gn71.png?width=555&format=png&auto=webp&s=0bcacd91a0fcb8c56932a886b1de3927d6217ff0

    Do you have any idea, how I can install APK into emulator without issues?

    Thanks.

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

    Privacy friendly analytics/custom event logging

    Posted: 14 Sep 2021 07:15 AM PDT

    I would like to add an analytics framework to my app. But firebase/Google analytics seems too big for what I need. I only want to log custom events to an analytics service, like {"duration" : 123}. This should be completely without collecting personal information (like Google analytics is doing). Is this possible somehow?

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

    Unable to sign up for AdMob, please help

    Posted: 14 Sep 2021 06:00 AM PDT

    I'm trying to sign up for AdMob but the "create admob account" button isn't able to be clicked. The button is grey and a "no entry" sign appears when I hover over it. I've linked a Google Publisher account and Google Ads account and am still no closer to getting signed up. My AdSense account is approved and my tax forms were just accepted and I am still having zero luck.

    What's happening and is there a fix for this issue?

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

    Google Play maximum free trial duration?

    Posted: 14 Sep 2021 05:33 AM PDT

    How long can you let your users enjoy free trial in Google play and also can you also tell me about Apple app Store.

    I tried searching online, but I've only found about grace period for making payments and not free trial itself.

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

    Is it possible to get near real time location updates while the phone is Idle using persistent notification with foreground service or accessibility service?

    Posted: 13 Sep 2021 03:16 PM PDT

    I've built an app that tracks the user location while driving, but since version 30 my app can't get location updates if the phone is idle(I'm using foreground service with persistent notification and FusedLocationProvider).

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

    Adding functionality within fragment

    Posted: 13 Sep 2021 11:15 PM PDT

    Hello,

    I'm somewhat new to programming mobile apps. Recently I've been practicing the use of libraries in activities and understanding how fragments work(separately). Currently, I'm trying to incorporate the two.

    I have an activity and layout that uses a color picker library in one project. In another project I have a series of fragments and navigating controls setup via the bottom navigation bar.

    I'm able to drop my color picker layout into one of my fragment layouts but I don't quite get how I'm supposed to incorporate the main activity from my color picker project into the fragments of my other project. Can I simply copy the main activity class from my color picker project into one of my ui fragments? What is the correct way to put these two together?

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

    Editing Shortcuts

    Posted: 13 Sep 2021 07:25 PM PDT

    I created a couple of activities shortcuts to a specific tool from one of those "toolbox" apps. Is there any fun to be had from messing with any of these fields? I've always been curious, but this kind of thing is a bit over my head.

    https://imgur.com/a/qCm8ZGf

    https://imgur.com/a/94tE2oA

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

    How does it take to get your Google Play Account verified?

    Posted: 13 Sep 2021 09:23 PM PDT

    Last month i received an email that I need to verify my Google Play Account to receive Payments. So I sent a copy of my ID and some documents. It's been 3 weeks now and there's no update whatsoever. The worst of all is that they sent money to my bank account before the verification request and it hasn't reached my account. I can't contact them through the support page because it keeps telling me my Merchant ID is invalid. I really don't know what to do.

    Does anyone here know how I can't contact them without having to input my Merchant ID in their support page? I've seen that it takes like 3 days to get verified or is this just the way it is these days?

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

    How was your experience with non-git version control systems like IBM RTC?

    Posted: 13 Sep 2021 01:44 PM PDT

    Hi Everyone,

    I have been using Git for version control on all of my projects so far and have never had a chance to work with any non-Git version control systems. Our mid-size team is using Git without any hassles so far. Currently, there is a proposal to migrate to IBM RTC on the project which I have been working on.

    IBM RTC doesn't seem to have Android Studio support and we have to rely on Eclipse to update the repository and It doesn't have a proper .gitignore replacement. How was your experience migrating your project to non-git based version control systems? and what are the challenges we should be expecting during migration and post-migration? Any strong case in point to stop this proposal would be very helpful.

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

    Bot Manager SDK: Akamai?

    Posted: 13 Sep 2021 01:30 PM PDT

    I am looking for bot protection which will work for both Web and Android apps, and one of the best options that I see is the Akamai Bot Manager. Unfortunately, Akamai only shows their mobile SDK instructions to registered customers.

    So my question is, for people here who have worked with this Mobile SDK, how easy it is to work with? Also, I would be glad to learn about your impression on how reliable this solution is, and maybe somebody has can suggest a better alternative?

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

    Pop up on home screen like on Google assistant.

    Posted: 13 Sep 2021 03:45 PM PDT

    I have been searching to find out how to do a pop up on home screen like what Google assistant does when you say hey google but i couldn't find any information. Does anyone know how i can implement this?

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

    MMR system for a casual scoreboard android application

    Posted: 13 Sep 2021 01:31 PM PDT

    Hello,

    Not sure if I'm in the right place, but here I go... I have recently picked up coding and android development as a hobby. Currently, the Google codelabs website is down. So I started writing a flowchart/blueprint for the app in a word document. I got to the most difficult question first. Which is the ranking system.

    Basically, I keep track of the table tennis matches during breaks at work. Currently, I use a google sheets document and a horrible hard-coded formula with unreadable IF statements to figure out the rankings. It works well for what it is, but I would like to expand the functionality. By moving to android.

    Currently, my way to do the MMR system works as follows (in case of a 1v1):

    If player 1 wins: ( (MMR_Player1 / MMR_Player2) * pointsPerGame) + inflation

    If player 2 wins: ( (MMR_Player2 / MMR_Player1) * pointsPerGame) + inflation

    Everyone starts out with 100 points and the pointsPerGame is set to 10. Inflation is set to 1. This is a band-aid solution for people going on vacation and such. I start with a duplicate of the excel sheet every month. This way everyone's rank gets reset at the end of the month, and the inflation doesn't grow out of control.

    The "problem" with this, is that the MMR is highly correlated to winrate. Ive tried playing around with values here and there but I think the way to solve it, is to raise the pointsPerGame. This way the leaderboards swing around more. Making for a more exciting competition. But also a more unfair competition, where someone can lose 28 days of the month and win everything in the last 2 days. And be #1 too quickly.

    Currently, the balance is good for the current player pool (6-8 consistent players). But data entry in google sheets is a bit of a hassle. And I would love to have an app that everyone WANTS to use. Currently, when I'm not there, 1 or 2 other people register the matches. But not consistently, which is largely due to the clunky nature of google sheets.

    What I'm looking for is an MMR system...

    • where if you don't play for a while, you lose points (compared to the rest of the players).
    • that is scalable (Aiming for a max of 20, but ideally infinitely scalable)
    • which has a high rate of volatility (Without being unfair to the top players)
    • which works for multiple timespans (Yearly/Monthly/Daily)
    • that is fun for both casual and serious players

    If anyone has any experience with this kind of challenge, I would love to hear your experiences or maybe a point in the right direction. I've looked at ELO and came across the "Online Bayesian Ranking". But honestly, I'm not sure my peanut brain is not quite ready to truly implement these systems properly. Any help or even a recommendation for a different subreddit is welcome. Thanks in advance!

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

    Website that list all dependency packages for android

    Posted: 13 Sep 2021 12:02 PM PDT

    Is there a website that lists all dependency packages and their descriptions to use in android apps? npmjs.com is a really great website for finding packages to use in JS projects. In android using the search feature to find packages is really terrible it seems unless you know the exact package name.

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

    App not available for my device eventhough it's supported?

    Posted: 13 Sep 2021 10:25 AM PDT

    Does anyone know why my app is not availble for my Galaxy Watch 4 while it is under the supported devices in the developer play console?

    Good to note is my app has gone live just a couple of minutes ago. It's not even findable in the actual play store yet, but when I type in the link myself I can get to the page. But when I'm there i have no option to download it because it says it's not available for both my devices(phone & watch). For my phone it shouldn't be available, but for my watch it should.

    Is this just a case where it can take some time before it's searchable in the app store and is downloadable? Or is something wrong?

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

    Inverted colours in Dark Mode? What causes it?

    Posted: 13 Sep 2021 09:42 AM PDT

    Inverted colours in Dark Mode? What causes it?

    Hello

    I am currently developing an Android app, that deals with colours to some extent. I also keep Dark Mode permanently on in my phone (A Xiaomi device, with Miui 12). I noticed a weird bug where lighter colours were being inverted. With some basic experimentation, I knew it was the dark mode causing the problem, and I was able to fix it easily using setForceDarkAllowed). I did this a couple of weeks ago, and now that I have some time I tried researching the issue.

    To my surprise, I couldn't reproduce the issue on AVD devices. (I tried Pixel 5 with SDK 28,29,30). After searching about it a bit, I found this question on StackOverflow which is the exact problem I faced, with the same solution.

    Now I am wondering why was this an issue on my actual phone, and not reproduced on the emulator.

    Here is a pair of screenshots from my experiment.

    Screenshot from Xiaomi Phone

    Screenshot from Emulator (Pixel 5, SDK 30)

    Both devices have Dark Mode on but on the physical phone, the Dialog Box, as well as the colour preview box (the right color box), have turned dark, while on the emulator both are displaying their true colours.

    The Dialog Box isn't the issue (noticed it while writing this), but you can see how the colour preview will be bad for UX.

    The best guess I have is that Miui implementation of Dark Mode is flawed somehow.

    TL;DR: I faced an issue, solved it but want to know why does the issue occur on some devices only.

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

    No comments:

    Post a Comment