• Breaking News

    Tuesday, March 2, 2021

    Android Dev - Weekly Questions Thread - March 02, 2021

    Android Dev - Weekly Questions Thread - March 02, 2021


    Weekly Questions Thread - March 02, 2021

    Posted: 02 Mar 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]

    Android Dev jobs which aren't basically CRUD apps

    Posted: 01 Mar 2021 10:25 PM PST

    I am an Android Developer at an MNC with about 3.5 YOE straight out of college. And while I am grateful for this job I am starting to get a bit tired out by the usual loop of Fetch stuff from API, do some modifications and show it on UI. Most of the time you barely do any hardcore algorithmic stuff since most of it happens in the backend (Not sure whether this is just the case with my company so happy to be proven wrong)

    Do any of you guys work on Android projects which are bit more involved at OS level and takes direct advantage of the platform rather than just using whatever SDK API Google thinks is cool currently? Android as an open platform is used in a variety of use cases apart from apps so wondering if any companies who do this kind of stuff which I can target?

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

    Commonsware: Don't Put All Your Eggs in One Basket - Google is not your friend

    Posted: 02 Mar 2021 03:53 AM PST

    Circle CI + Android configuration tips

    Posted: 01 Mar 2021 06:03 PM PST

    Bind attributes easily in your custom views using Tablespoon!

    Posted: 02 Mar 2021 06:39 AM PST

    A small side-project-turned-library that helps with binding xml attributes to custom views easily using annotations. Check it out:
    https://github.com/nikhilpanju/Tablespoon

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

    Distribution Channel For B2B / Enterprise Apps?

    Posted: 02 Mar 2021 03:55 AM PST

    Curious what people's experiences have been using Google Play Store vs direct download or some other distribution Channel for B2B apps where the business is buying/subscribing to X number of licenses for their employees.

    Advantages and disadvantages? Obviously Play Store makes version control easier. Any other thoughts or anecdotes?

    Thanks!

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

    What to focus on to make most employers want you?

    Posted: 02 Mar 2021 05:39 AM PST

    Hey everyone,
    I have 3+ years of professional experience as an Android developer. I've been working for a small company on small/internal projects so it does not look all that great in the CV. I feel confident as a developer as the company had good flow of Code Reviews and cooperation, but that does not show on the CV either.

    I'm taking some time (+- 5 months) off to focus on making my CV/online presence stand out and find a better job afterwards.

    My question is: what should I (or anyone) focus on the most to get the best position?

    • try really hard and push a usable app to the Play Store? (seems like a really tall order nowadays that literally everything has been done before (unless you have a really great idea))
    • start blogging/writing articles?
    • build smaller projects/libraries and publish on GitHub?
    • all of the above?
    • other ideas?
    submitted by /u/jakub-minarik
    [link] [comments]

    Mavericks (previously know as MvRx) now supports Jetpack Compose

    Posted: 01 Mar 2021 09:38 PM PST

    Tree structured models in MVVM pattern.

    Posted: 02 Mar 2021 08:40 AM PST

    I did some (little) research on which specific java package should I use to design trees, and it was somewhat a surprise to find out that there really isn't a dedicated package for this, so with a few hundred lines I designed a tree class, that stores nodes in a relational way (unique keyed nodes).

    I also thought it would be good to provide downward communication between parent and children, so I did.

    What I found out just now, after giving it some thought, is that most of the model interactions in my project could be concatenated with this tree.

    But before jumping on the journey of actually doing it, which I think would require some effort, I ask you If you have seen such a design in a project and how easy is it to maintain and read,

    is it a good idea? is it efficient?

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

    Advice on implementing secure delete application using hardware key store

    Posted: 02 Mar 2021 08:15 AM PST

    I'm starting to work on an app that will let the user input some secret text, and later view that text. There would also be a button that would permanently "erase" the text, or at least make it impossible to read.

    My strategy was going to be to encrypt the secret prior to storing it. The decryption key would be stored in the KeyStore hardware security zone. To destroy access to the secret, the button would delete the decryption key from the KeyStore.

    Just wondering if that is a good way to approach this problem, or if anyone had a different idea.

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

    OEM unlock help

    Posted: 02 Mar 2021 06:21 AM PST

    Hello all, I just purchased a pixel 3xl from eBay. It's service unlocked, google themselves confirmed this via the chat help. But, when I click on oem unlock, it asks if I am sure, I select okay, and then it immediately turns back off.. I have tried factory reset, doing it via fastboot,... I am at a loss. Any tips?

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

    Can the same instance of a fragment be reused with a different arguments?

    Posted: 02 Mar 2021 05:43 AM PST

    Say we have some sort of fragment recycling component (pager, etc.) where we have the same fragment class and provide to it different arguments. Can the same instance be "recycled" and reused with different arguments?

    I'm asking because I've seen some patterns where people use a lazy val accessort for a fragment argument value, which would be problematic in these cases.

    (really hard to find documentation as to what the Android SDK does and *can do* with fragments)

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

    With the latest emulator 30.4.5.0 , -gpu angle_indirect does not seem to really work

    Posted: 01 Mar 2021 11:07 PM PST

    I'm using an old laptop, which has 4th gen Intel CPU and NVIDIA GPU with Maxwell1 arch. Of course VT-x is enabled. The OS is Windows 10 20H2 x64.

    By default GPU emulation is enabled (host mode). Since host mode seemed to have some problem for me, I looked for alternative options. I then tried running emulator.exe manually, with -gpu angle_indirect argument. The emulator then started normally, however it's somewhat laggy, then I found that the emulator didn't seem to actually use the GPU - the NVIDIA tray icon said there was no apps using GPU at all! Task manager also showed almost zero GPU usage. Process Explorer also showed that qemu-system-x86_64.exe didn't load any DLL under emulator\lib64\gles_angle subdirectory.

    After some googling I found an older version of the emulator (27.3.10), which seems to be able to actually use GPU. However this old version can't start newer Android Q AVDs.

    I'm okay with this situation. I just think it's somewhat funny that the angle_indirect option seems to be bogus - however I'm not sure whether it was just me who encountered this problem.

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

    i just opened a new console account. and im also want to open a new bank account since i dont have one yet. my problem is why google play is asking a USD bank account?its so expensive here to open a usd bank account. is it possible to Change the currency requirement from USD to PHP?

    Posted: 01 Mar 2021 08:25 PM PST

    Having fun with jetpack compose?

    Posted: 02 Mar 2021 01:03 AM PST

    I saw the current trend of making puppies listing app with jetpack compose on Twitter and was thinking to do that and learn compose more and see what changed since the early alpha builds ... but I couldn't even build the template created by android studio. Error is explained (Here).

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

    Is there really any point in the ActionBar (as opposed to a custom layout)?

    Posted: 01 Mar 2021 07:40 PM PST

    Bit of a noob question, but I'm finding ActionBar just a bit of a pain in the ass to work with. To make a custom one I need to create menu files, have a lot of code in OnCreate for what should be pretty simple, and as far as I can tell it's impossible for me to use svgs as icons as they don't resize correctly, so I need to have several correctly-sized png icons.

    So I'm giving up and just having a noactionbar theme with a simple LinearLayout that will look exactly the same as the bar. But is there anything bad about doing this? It seems like both less work and more effective results, so I'm a little unsure why I can't find anyone advocating for it.

    Also, side question, but does anyone know how I can find all the default attributes for ActionBar to copy into my fake one? I can use ?attr/actionbarsize to get its height and I found that text size is 18sp, but anyone know about exact icon dimenstions/margins/etc? Thanks.

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

    Any theming masters here?

    Posted: 01 Mar 2021 04:13 PM PST

    I'm digging into theming quite a bit and running into this issue where the ContextThemeWrapper I'm using is working for inflated views that have an attribute directly on the view, but not for views that have a style, which then has an attribute.

    It works for:

    <TextView android:textColor="?attr/textColorPrimary" /> 

    But surprisingly doesn't work for:

    <TextView style="@style/PrimaryText" /> <style name="PrimaryText"> <item name="android:textColor">?attr/textColorPrimary</item> </style> 
    submitted by /u/honnetatamae
    [link] [comments]

    LiveData expected behaviour

    Posted: 01 Mar 2021 11:59 AM PST

    Hello.

    In case you have a LiveData in your ViewModel, which uses a SwitchMap so that when it changes, load new data from the repository, should that LiveData still be there when you navigate back to the Fragment observing the ViewModel?

    I'm asking because I'm using this pattern for list and detail fragments. And when selected, the element details is loads correctly in details Fragment. But when navigating back to the details Fragment without selecting another item, details Fragment shows nothing and LiveData apparently is null.

    Ps: Have it posted in StackOverflow too with more details:

    https://stackoverflow.com/questions/66420907/livedata-switchmap-in-viewmodel-only-returns-data-the-first-time

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

    Complying with GDPR

    Posted: 01 Mar 2021 11:57 AM PST

    I think this is a generic enough question but if it isn't then please delete or whatever lol. I'm making a game in gdevelop (if that matters, it uses psuedo code so i'm not going to have specifics here as far as coding in my game goes) and planning to sell it for a fixed price on google play. Offline, no ads, no ingame purchases, no login or any data entry, no google analytics (unless that is included automatically when you add to it google play?) or 3rd party crash reports. I'm using just base gdvelop tools to make it and haven't added any 3rd party stuff to it while making it. My game does pull time from my players device to set the time ingame, and it writes information to storage (and i believe that exists in a savefile but honestly i'm not 100% sure how that sort of thing works), either way none of that comes back to me in any way, it all stays on their device.

    Is there anything that I could possibly need a consent form for that I'm not aware of? Say, in relation to google play's developer console and what it reports, or anything else?

    (also just to mention, by set price I mean $0.99. This is my first game and I don't think it's going to make much money but after looking into privacy laws, it scared me away from monetizing it with ads, and my goal now is to not collect any data whatsoever)

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

    Why i have so many uninstalls on my android app?

    Posted: 01 Mar 2021 10:07 PM PST

    I have a word game app on Google play store called " Connect Words - AI based Word Game " .

    Whenever i use Google play (Adwords) for advertisement i face huge issue of uninstalls. Is this common with everyone. However i have not check other mediums of advertising like on reddit, FB, twitter as Google ads seems to be cheapest.

    Kindly advice

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

    Disable Richtext i.e. HTML / Spanned Text in Edittext

    Posted: 01 Mar 2021 02:01 PM PST

    I am working on a basic notes app. I currently do NOT want to support rich text as its not something I offer as part of the app. The problem I run into is when I copy paste text from a webpage Edittext by default captures HTML formatting like colors etc.

    How can I disable this? Been hunting stackoverflow but have yet to come across a straight way of achieving this. The behavior I am looking for is like Google Keep where even copy pasted webpage is presented as regular text.

    Not sure if its something basic I have overlooked but would really appreciate some guidance

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

    Is it okay to switch from a one time Ad removal to a subscription model?

    Posted: 01 Mar 2021 04:48 PM PST

    Like the title says I have an old app that I'm doing a massive overhaul to. Has about 35K active installs. It's a free app with ads and the only IAP was $1.99 to remove Ads. Haven't updated the app in years. I'm switching the model to a subscription base where I'll be updating it with new content monthly, however limiting the new access to subscribers and the subscription will remove ads.

    What I'm a little worried about and not sure how to handle is when I update it will dedicated users be upset that their one-time purchase no longer prevents Ads? I plan to have an old version of the apk on a website Ad-free they can just download if they want, but I'm not sure if there's a transition tool Play Store has that could for example give loyal users say a month or two free. Also guess just want to know if what I'm doing is acceptable and not caught off guard by some policy.

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

    No comments:

    Post a Comment