/r/androiddev
News for Android developers with the who, what, where, when and how of the Android community.
News / Articles / Talks / Tools / Open source!
News for Android app developers with the who, what, where, when, and how of the Android community. Probably mostly the how.
Here, you'll find:
This sub-reddit isn't about phones' and apps' general functionality, support, or system software development (ROMs). For news and questions about these topics try using other subs like
Starting Android career in 2022
Android Job Interview Questions and Answers
App Portfolio Ideas, Tiered List
Autoposted at approx 9AM EST / 2PM GMT
/r/androiddev
So my phone lost its certification overnight. Didn't root it, didn't open bootloader, etc., tried everything I can imagine, no avail. Not important.
My question is if I were to change its motherboard to a new one, would it possibly get the certification with the new hardware? If not, is there any hardware I can change for it to work?
So today at work one of my coworkers showed me this image (it's and instagram post) and wanted to the name of the theme. He wanted the theme for visual studio but I think it's for android studio. I hope I'm right and also, I hope that it's a well known theme and I can find it for visual studio as well. Just need to know the name of it for android studio.
I've searched android/visual studio (and vs code) themes for pink and cyan themes. The closest I got was some sakura themes and dracula.
Here are the images:
Close up image of the editor window. I've also tried google image search but to no avail.
Hello,
Lately I've been writing about Process Death in details as to help everyone be aware of the issues it can bring on our apps if we don't pay attention to it.
Till now I've written three posts!
Hope this helps, and of course constructive feedback will always be welcomed 😊
I made a very simple app just to show a map and a marker following google's recommended architecture (Compose, Hilt, VM, Coroutines) and Map Library. The final apk size was 7.2 mb. What are the recommended approach to reduce my apk size. What would have been my app size if it would have been made in pure java and XML.
Currently taking an Udemy course on Android App Dev to learn the nuts and bolts of coding in Kotlin and Jetpack Compose and am looking to supplement this with some books that look at the big picture of Mobile App development, architecture, design philosophy, business models, etc. Any book recommendations, or even podcasts, YouTube channels or blogs, would be appreciated. Thanks.
This weekly thread is for the following purposes but is not limited to.
Please check sidebar before posting for the wiki, our Discord, and 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!
Looking for all the Questions threads? Want an easy way to locate this week's thread? Click here for old questions thread and here for discussion thread.
At my current org (mid-large sized startup), we have weekly app release, which I feel is too many releases.
In my previous orgs, I have seen releases happen at end of each sprint, i.e 2 Weeks.
Weekly release is extremely tiresome and is very unnecessary IMO. Each release not only takes additional bandwidth, but also causes constant deadlines and anxiety to people.
What is the app release cycle be like at your organisation? Want to know the general standard followed across industry.
Is it 2 GB for all or can AOSP, in its latest form, be useful in tiny devices with 1 gig or less?
I am working on an app that is using kotlin and jetpack compose for the ui. So far I only know about MPAndroidCharts but are there any other libraries that are well documented or a better fit for my user interface?
I Love Programming since I was kid every time I start learning I drop in the middle, So I decided to learn this time but it seems my pc is too bad so can I still programming with this specs or not
INTEL CELERON G1840
4GB
INTEL HD GRAPHICS FAMILY 1824
[SOLVED]
See comments below for 2 different solutions for the problem.
Ok I'm actually losing my mind over this and I need help. I'm pretty new to android development so if this post is missing info let me know and I'll edit to post to add it.
All I'm trying to do is get a single .proto file to be genrated into java code within my project so that I can import it to use my java files.
The gradle build is kotlin (gradle.build.kts) and every single example I could find was using the groovy build (build.gradle) and no matter how I tried to translate it nothing works. Either it doesn't compile the .proto file at all, or at best it manages to compile it to a java file which causes a build error itself when im building the project.
I can't figure out what I'm doing wrong and I've been on it all day and losing my sanity with every failed build. Any help is appreciated.
Can an android app obtain the current network's SSID and password? I know it can be done on Windows, but does an android app have that kind of permissions? Either by asking the network or retrieving a stored file?
I want to add a time limit to my multiplayer. The countdown timer should run for 1-minute, and game must be finished when it reaches zero. There is two clients in the room, and I want to synchronize their clock, so it finishes almost simultaneously for both.
It seems impossible to implement all the logic on client-side only, because of the differences in device performances and possibilities of "cheating".
I also though about running a clock on the server using Firebase Functions CLI, and updating rooms' time left field each second. However this solution not only inefficient, but also very depended on server connection latency, which alters the time.
Is there any better approach to this problem?
Reading the recent threads and its replies about two versions of the same application - one barebones and one not-so barebones - reminded me of a video I watched on Android services and IPCs where the lector mentions how programmers, in the beginning, were opposed to control flow statements and information hiding amongst under things, because it was 'new and unnecessary '.
Then a few years later they changed their minds. This has been happening since the 60s with every new innovation.
Video in question, timestamp 43:41 - the segment is just a few minutes long I strongly recommend it.
My point is innovation is needed, separating the wheat from the chaff too. But, allowing myself to use another aphorism - let's not throw away the baby along with the bathwater.
Can't you just have a viewmodel?
I'm having issues where the grade build is very slow on my Surface Pro 9. Even the default empty activity project takes 2 min to build. Things I have tried: disable Windows Defender, enable parallel build, physical Debugging device, highest performance mode in windows. Any help is appreciated.
The below code works well for PDFs without annotations. Now, I'm looking to enhance this to support annotated PDFs as mentioned in the Android 15 Developer Preview release notes. But the annotated text isn't being displayed.
val params = RenderParams.Builder(RENDER_MODE_FOR_DISPLAY)
.setRenderFlags(FLAG_RENDER_HIGHLIGHT_ANNOTATIONS).build()
page.render(bitmap, null, null, params)
Image(bitmap = bitmap.asImageBitmap(), contentDescription = null)
Here's a sample annotated pdf - here
Hi friends,
I'm learning Paging 3 and being struggle with it. I can list here some concerns of mine could you guys help to answer?
The PagingSource has the getRefreshKey function. When will this function get called? What is its purpose?
Does Paging 3 only work with hot stream?
The PagingDataAdapter use the PagingData from hot stream and set it directly via submitData. Could you guys help me to explain How it work under the hood?
Thanks for helping me friends ⊂((・▽・))⊃
I have seen this in new Google's now in android video but cannot find any resources talking about it , Anyone has any idea what that means ?
The Medium Article
I was making an app which could have thousands of markers shown on map at a time, so I decided to use Marker Clustering ( a feature by google maps to combine markers and prevent collision). It is unbelievable to see such a poor and laggy performance even in high end android device for marker clustering. Any suggestions are welcome.
GIST: https://gist.github.com/spss20/b1b9781889113c6d3863846204c85412
I keep getting an error saying val cannot be changed.
Also when creating an instance of the composable with the TextField, what do I put the parameters?
Is there a big difference in build times, gradles syncing etc? I know android studio is tailored towards unix but how much if a difference is it. Is it worth moving towards Mac if your develop native android?
I'm considering buying a Mac Mini M2 as they seem to be the best value and don't take up too much space. Just looking for information on whether it's worth the change in os
Last time I used realm I had to embed the realm models and adapters etc throughout the app to get the live updates since you couldn't pass the objects between threads. I'm creating a new app now and came across "Frozen Architecture" in the docs but I don't fully understand what this gives me in reality.
Could anyone with experience using this this let me know if the following is now possible?
If this can't be done what is the best practice these days for using realm? Pretty much all the "how to do realm right" articles are like 5 years old unless ive missed something that someone could link me to?
Heyo!
At my company we've been talking about how we want to layer our app and have decided to align with Google recommendations for its wide recognition and readily available documentation. However, when looking through the documentation their description of "domain" confused me, so I'd love to hear some of your guys thoughts/opinions.
From my current understanding, the domain layer usually serves as the heart of a software's design. It contains the core business models, logic, rules, and is independent of platform and any other layers.
However, I noticed a deviation in Google's "Guide to App Architecture" where the domain model is seemingly integrated within the data layer, causing the domain layer to depend on the data layer for its operations. This approach seems at odds with traditional clean architecture ( I know I know) , where the domain layer should ideally be decoupled from data handling and UI concerns.
Given that Google’s architecture guide outlines a separation into UI, domain, and data layers, it appears there's an intention to align with clean architecture principles. Yet, the implementation details suggest otherwise.
edit: Fixing terrible wording
Hey devs!
I've ran into the same issue with a few apps I've made and I wanted to ask if you have the same experience. Offline-first databases synced online. I'm considering writing a library and I'd like some thoughts.
Apps that rely on an online connection (think anything with *Retrofit`) stop working if there is no connection, the servers die, and are generally slower. Apps that rely on local data (think Room) keep the data local unless code is intentionally written to communicate with a server.
There is no middle-ground, offline first library with scheduled or user-initiated sync functionality.
(that I know of. Let me know if I'm wrong)
AnkiDroid. An amazing app. 100% of the functionality is available offline, but the user may, optionally, sync with a web server and access their collection on different devices.
I want to implement something similar, in a reusable library.
Imagine a library that acts between two layers:
The local database, likely an SQLite file (possibly created by the Room library).
An external database, whether on the web, or a .db file on the user's external storage.
My library would propagate additions, deletions, and changes between these two. You could self-host your own database, easily create backups, or share your database over something like Syncthing.
Would something like this be useful to you?
Did I miss an implementation that already exists?
Any other suggestions?
I've been struggling with this for a while. At the moment the emulator simply terminates whenever I try to run something on the hardware.
​
This is the only device I can run, as it's graphics is set to Software. but for any of the others that are set to automatic or hardware, it just does this when I try to run it.
​
​
​
I've run -accel-check and it spits out
accel:
0
AEHD (version 2.2) is installed and usable.
accel
So from that I assume hardware acceleration should be on using the android emulator hyperdriver, but I'm really inexperienced when it comes to this and I'm not sure what's going on.
Some places said to make sure Hyper-v is disabled in windows features, and I don't even have access to it due to my windows version, so it can't be that. And the other virtual machine features are disabled there too, virtualisation is also enabled in my bios.
Ultimately I'm not sure what to do, I can try and provide any more information if needed but I'm out of ideas. Do you happen to know what else I could try?
As i said, will i get terminated if one of my testers are already banned or related with banned accounts? Just because of this i am really scared to share my link to my friends from internet
I'm a developer of a leading device automation app on the Play Store and I have recently had an update rejected because it violates the SMS/call log permission policy. I filled out the policy declaration form years ago and all has been well because they have an explicit exception for device automation apps as listed here: https://support.google.com/googleplay/android-developer/answer/10208820?visit_id=638320367743206642-844692561&rd=1#exceptions&zippy=%2Cexceptions
The initial rejection was as follows:
The whole purpose of my app is to enable the user to specify automations based on triggers set by the user, so I found this a little surprising. I appealed the decision to point this out but the appeal was rejected very quickly (obviously by a bot)
I submitted a new updated and updated the policy declaration from to include a link to a video. This video demonstrates how to configure a simple automation such that when an SMS is received from a certain contact it will auto reply to that SMS with an automated reply (specified) by the user. In addition in the policy declaration form along with step by step instructions how to use the app to do the same.
This has also been rejected:
I have appealed yet again, but of course there is a 99.9% chance it will be quickly auto rejected.
Does anyone have any advice on an appropriate route to bypass the bot wall and somehow convince someone that an app that has been a leading device automation app for over a decade and has the word "Device Automation" in the app title is actually a device automation app?
My app has a lot of downloads but I'm just an indie dev with no connections in Google so the popularity of my app counts for pretty much nothing in this scenario