Weekly Questions Thread - December 07, 2021 Android Dev |
- Weekly Questions Thread - December 07, 2021
- Weekly Who's Hiring Thread - December 06, 2021
- Styles and themes in xml are hard to work with
- WebView not found? Time to crash everything!
- Having issues connecting to an API to display search results to the user in an app.
- Android 12 and Notification Trampolines
- Best way to pass data to a fragment and prevent Transaction Too Large exceptions?
- Communication between UI and Logic
- Device wont switch on programatically
- How to achieve this Z-Axis animation
- Slotting in with Compose UI
- Are kernel sources enough to make custom roms for mediatek? (xiaomi redmi note 11 series)
- Building a library for Jetpack Compose UI and screenshot testing
- Best way to manage a fleet of Android devices and push app updates (without prompting Google login challenges)?
- Alternatives to Pendo
- Android TV app rejected, with no further details provided / tickets being ignored
- Room Database | Android Jetpack
- Open source Android projects with lots of Gradle modules
- What's the best no code tool for publishing an MVP/beta ?
- Mistakenly registered (paid $25) as organisation in Google Play developer
- Previewing to rear cameras simultaneously
- The problem with mobile development, in one image
- Any advice on developing first app?
- Android 11 Shared Storage
- Save me before interview
- 1 star review from cheap phones
- how to upgrade your app listing page.
Weekly Questions Thread - December 07, 2021 Posted: 07 Dec 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:
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! [link] [comments] | ||
Weekly Who's Hiring Thread - December 06, 2021 Posted: 06 Dec 2021 06:00 AM PST Looking for Android developers? Heard about a cool job posting? Let people know! Here is a suggested posting template:
Feel free to include any other information about the job. [link] [comments] | ||
Styles and themes in xml are hard to work with Posted: 07 Dec 2021 04:40 AM PST Hi everyone, for context i come from a web background, and i find styles and theming overly complicated in Android. They're hard to work with compared to css, which i know has its own challenges as well. to be clear i dont mean working with views like constraintview, ... etc and their attributes (i.e width, height, alignment), in fact this part is clear and works pretty much like css, but rather the structure of styles and themes in the res directory that makes styling these views reusable and organized. but then again i don't haven't much experience on android so it might just need getting used to. and what makes matters worse, is that there aren't many resources explaining this stuff. so what do you think? [link] [comments] | ||
WebView not found? Time to crash everything! Posted: 07 Dec 2021 10:33 AM PST WebView's distribution has been decoupled from the OS which leads to issues such as: "Failed to load WebView provider: No WebView installed" Have you ever come up against this, and if so, how do you handle it? [link] [comments] | ||
Having issues connecting to an API to display search results to the user in an app. Posted: 07 Dec 2021 10:12 AM PST I am trying to create an app that will link to this api "https://api.covid19tracker.ca/reports?after=" which store an array "data" with objects in it for various information in int. However, I am currently getting a "org.json.JSONException: Value unsuccessful of type java.lang.String cannot be converted to JSONArray" just trying to display the results into a RecyclerView. I will be using an event click listener to link the search to a button but I just want the API to work and display everything first. I appreciate any help that anybody can offer. MainActivity.java
DataCovid.java AdapterCovid.java
activity_main Layout File [link] [comments] | ||
Android 12 and Notification Trampolines Posted: 07 Dec 2021 08:15 AM PST As a new Android developer, I never realized I was using an anti-pattern with a broadcast receiver to start a third-party app/activity and perform some internal operations when a user selects an action button in my app's notification. I thought this was the preferred method to do this. Fast forward to Android 12 and this is forbidden per https://developer.android.com/about/versions/12/behavior-changes-12#notification-trampolines. If I was starting my app's activity from a notification, I can easily address this, but I'm uncertain of the best way to handle this when starting a third-party app/activity. In perusing Stack Overflow, the accepted answer at https://stackoverflow.com/questions/69238026/android-12-notification-trampoline-restrictions is to use a "transparent" activity, which just seems like another anti-pattern to me (and someone else mentioned this in the comments there). How is everyone else handling this in the third-party app/activity case? What am I missing? I'd love to get my targetSdkVersion up without investing in yet another anti-pattern. Cheers. [link] [comments] | ||
Best way to pass data to a fragment and prevent Transaction Too Large exceptions? Posted: 07 Dec 2021 01:45 AM PST I think this is a common issue I'm seeing with code at work. Commonly, there's some sort of object we parse from a network API, then pass this object around. For example, let's say we have a typical master detail list. On the master list screen, we fetch the objects and display it in a list. On the detail screen, we pass the the object clicked to display. I'm finding some users then get Transaction Too Large exceptions, which I think are from bundles that are too big. Sometimes the objects we parse from the JSON may have long Strings and I think the bundles with restoreInstanceState or something in the main activity seems to be growing larger over time. What are some of the ways to pass data? My thoughts:
These are the ones I'm most familiar with. But I've also heard of perhaps using a repository to somehow do this? Would it be some sort of shared flow? Or maybe saving it to a Room database and retrieving it? Any thoughts on passing JSON objects which can be potentially too big? [link] [comments] | ||
Communication between UI and Logic Posted: 07 Dec 2021 04:38 AM PST Hey devs, I would like to know, how you guys implement the communication between the UI and the Logic. Let's say we use MVVM (View as the UI and ViewModel as the Logic) and there is a scenario where the user clicks on a button, an AlertDialog pops up and the user can click on further actions on the Dialog. I was wondering, how detailed the communication should be: Option 1: Options 2: Option 1 seems a little more consistent, because every single action from the user goes to the ViewModel. But at the same time, it seems a little bit too much. Especially if you have more Dialogs in a feature and there is a big ping pong between View and ViewModel. Options 2 could be not really consistent, but maybe the View is able to handle "UI-Logic" by itself and can trigger the ViewModel, when its really necessary. This would help to avoid a lot of code. What do you think? [link] [comments] | ||
Device wont switch on programatically Posted: 07 Dec 2021 04:12 AM PST I am working on a app, a part of which allows the user to specify a off/on time for the device. The app works fine of the emulator, and my Samsung S7 Note, but I also have a large screen interactive whiteboard that has a Android on-board system. On this system, the app switches the display off OK, but for switching on we hear the 'click' sound the device makes when turning on, but the display remains off. We think there might be a Android system setting affecting this, but if so which one? The code to turn the device back on is:
[link] [comments] | ||
How to achieve this Z-Axis animation Posted: 07 Dec 2021 03:49 AM PST I noticed this effect in Bundled Notes (note taking app for Android) When opening a BottomSheetDialogFragment, the activity/fragment behind it gets animated up/down based on the bottom dialog's offset. Getting the offset of the dialog is quite easy, but then using that value to change the view behind it is proving difficult. I've tried messing with the window/decorView, modifying the translationZ and also the X/Y scale, but nothing works. Does anyone know how to achieve this? Thanks. [link] [comments] | ||
Posted: 06 Dec 2021 07:06 AM PST
| ||
Are kernel sources enough to make custom roms for mediatek? (xiaomi redmi note 11 series) Posted: 07 Dec 2021 02:54 AM PST I read thata XIaomi released the kernel sources for note 11 series in this november. Considering mediatek being closed source, does the release of kernel sources give any hope into custom rom development of this android phone? [link] [comments] | ||
Building a library for Jetpack Compose UI and screenshot testing Posted: 06 Dec 2021 12:29 PM PST
| ||
Posted: 06 Dec 2021 12:07 PM PST Hi there, here is my use case: I am an app developer who ships my app pre-deployed on Android devices to various customers (the device is used only to run this app). These devices are logged in to a specific Google Workspace account and updates are pushed through Google Firebase App Distribution (tied to that Google account). I recognize this is not the intended purpose of Firebase App Distribution. I have turned off 2FA for this Google Workspace account. The problem I am encountering is that after some time if the session expires, or if Google detects a "suspicious login", when they try to access Firebase App Distribution it will force the user to re-authenticate the Google account which then prompts a Google "verify it's you" login challenge showing on all other logged in users' Android devices which is a very poor experience. Q: Is there any kind of provisioning I could perform on the Android devices before shipping them out that would enable me to continue to be logged in to a Google account and still use Firebase app distribution, but would never prompt the user for a login challenge? Does Google Workspace MDM allow for this (indefinite session)? If not, what is my best alternative? Using a third party MDM provider such as Scalefusion instead of Firebase App Distribution that doesn't depend on Google account sessions? Thank you. [link] [comments] | ||
Posted: 06 Dec 2021 04:48 PM PST Hi everyone! I currently use pendo to gain insight into customer usage of a web client. I was looking into adding an Android license, but found out it was going to cost 5k per application. While this isn't unfeasible, I was wondering if any of ya'll knew of any free/cheaper alternatives. Thanks! [link] [comments] | ||
Android TV app rejected, with no further details provided / tickets being ignored Posted: 06 Dec 2021 07:57 AM PST Hey everyone, I am posting it here in order to get some guidance as I am lost as to what I can do. I submitted my Android TV app around a month ago and it was rejected due to: "Your app depends on having a "Start," "Select," or "Menu" button to reach the menu" The rejection reason is quite obvious, the issue I am having is that I have a button called "Menu" on screen all the time that you can navigate to using the D-PADS. Due to the mentioned above, I submitted a request for more information and explaining what I explained above, the first ticket was submitted a month ago, after not receiving any kind of response for a week I submitted another ticket, after two weeks of no response I submitted another ticket (a week ago) and obviously I didn't get any response. Any ideas what I can do? Edit: A very important thing to notice, I have been developing Android TV apps for almost 5 years now, submitted and published many of them in the Play Store but never encountered a situation such as this. [link] [comments] | ||
Room Database | Android Jetpack Posted: 06 Dec 2021 10:15 PM PST
| ||
Open source Android projects with lots of Gradle modules Posted: 06 Dec 2021 08:03 AM PST Ok, I know this might be weird, but let me explain... I'm looking to explore an Android project with hundreds of Gradle modules to see how and why it is implemented that way. I know some large production apps uses thousands of modules, but obviously is not possible to explore the codebase. Does anyone know any open source project with that scale of modules? I believe the modules would be extremely small, and would contain just the minimal necessary code in it. Still, I'm extremely curious, so if anyone might share something related to this I would be glad to know! [link] [comments] | ||
What's the best no code tool for publishing an MVP/beta ? Posted: 06 Dec 2021 11:00 PM PST Hi, I'm a backend python developer (I do some frontend dev in vueJS too) and I have a few mobile apps ideas. I don't have a lot of time lately but I still want to be able to dev MVPs on weekends and publish them to see if it's worth spending more time on a project. So I started looking at some no code tools, but there are so many of them ...I saw for example : appgyver, Adalo, glide that seem to do front and back end, things like xano for back end but no front, and bravo that transforms figma designs into apps. The best tool for me would have a variety of templates to work from and would help deploying the app to android (ios would be a nice to have) playstore. The best tool should also be the fastest one getting you from idea to deployed app with a clean result. Do you have any experience with this kind of tools ? What do you recommend ? [link] [comments] | ||
Mistakenly registered (paid $25) as organisation in Google Play developer Posted: 06 Dec 2021 01:09 PM PST Hi, Today, I had registered in Google Play developer profile for the first time. I had paid $25 and I mistakenly added as organisation instead of personal account. Now it is asking me for organisation details for verification, which I don't have(obviously). I have changes my account info to personal but it is still asking for organisation details for verification of identity. What to do now, like how to verify my account? Badly stuck, please help guys! [link] [comments] | ||
Previewing to rear cameras simultaneously Posted: 06 Dec 2021 01:05 PM PST Hello, I am trying to do what title says but I keep hitting a brick wall. From the camera manager's getCameraIds method I can see that there are three cameras on my phone: 0 ("normal" rear camera), 1 (front camera) and 2 ("wide angle camera). I can preview any of the to rear cameras and the front camera simultaneously with no issue, but when I try to open both rear cameras the camera device's state callback of the last-opened camera goes into the onError method with error 2, which from the documentation is correlated to the maximum amount of simultaneously open cameras having been reached. The question is: is there any way of getting around this limitation? [link] [comments] | ||
The problem with mobile development, in one image Posted: 07 Dec 2021 03:08 AM PST
| ||
Any advice on developing first app? Posted: 06 Dec 2021 11:27 AM PST Hello, my friends and I recently came up with an idea for an app. Does anyone have any advice on what common mistakes are? From a newbie anything willa help :) [link] [comments] | ||
Posted: 05 Dec 2021 10:35 PM PST Hello all, I'm working on an app that targets Android 11 and am trying to wrap my head around the framework. Namely, is it still possible to read a file from the shared images, edit it, and write to it still? If so, how would I go about doing that? If this is the wrong place to post, please let me know. [link] [comments] | ||
Posted: 05 Dec 2021 06:57 PM PST After 2 years being away from coding. Luckily I have a pretty descent job opportunity in a good company. My technical interview is this week so it would be appreciated if anyone can suggest a course or simple project that covers most used features. [link] [comments] | ||
1 star review from cheap phones Posted: 06 Dec 2021 10:18 AM PST I have an app recently got a few one star reviews complaining performance problem. But they all come from users with cheap $50 Walmart phone. How do you respond to those reviews? I would like to call out they are using a cheap phone in a polite way. Also do you guys blacklist all the cheap devices for your apps in the play console? [link] [comments] | ||
how to upgrade your app listing page. Posted: 06 Dec 2021 10:14 AM PST In this post, we will look at the Poltreder google play app listing. What impact do: app name, app icon, short description, screenshots, etc… make. And how you can make your Google Play app listing better. How does this sound? Let's get started! https://medium.com/augeo/how-to-upgrade-your-app-listing-page-98c198cb8886 [link] [comments] |
You are subscribed to email updates from Developing Android Apps. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment