r/android_devs • • Nov 25 '20

Publishing Experiences with the Huawei App Gallery?

13 Upvotes

At work, we'll need to make sure that we can release the app not only on the Google Play Store, but also on the Huawei App Gallery.

Does anyone here have an experience with this process?

For example, we'll have to ditch Google Play Services, and therefore Google Maps, in order to make this happen - and decide on either a new map provider, or just "hide the feature" and replace it with some list or something.

What is your experience, what is there to look out for? I presume there will definitely be build flavors involved (of course).


r/android_devs • • Oct 24 '20

Discussion Observations of "requestLegacyExternalStorage" behavior on Android 10 and Android 11

13 Upvotes

I have tested an app on emulator running Android 10 (API 29) and Android 11 (API 30), with the addition of the line:

AndroidManifest.xml:

android:requestLegacyExternalStorage="true"

This is the method suggested by Google to allow apps to continue to work as before (avoiding the new "scoped storage" restrictions in Android 10 and Android 11).


Results on Android 10 (API 29)

When the app is targeting Android 10 (API 29) - i.e. using build.gradle:

compileSdkVersion 30

targetSdkVersion 29

then the app works as before (legacy behavior) on BOTH Android 10 and Android 11:

  • emulator running Android 10 (API 29)

  • emulator running Android 11 (API 30)

That is, the files your app creates in a top level folder on internal storage ARE created correctly.

The app can also delete/rename files as well.

AND these files remain visible and accessible when you try to view them using the built-in Files app (file manager).

This means if you choose to transition to one of the "shared storage" folders like Music or Downloads - you will be able to copy over files there, and you will be able to delete the files from the old location.


Results on Android 11 (API 30)

However, when you target Android 11 - i.e. using build.gradle:

compileSdkVersion 30

targetSdkVersion 30

then the app works as before (legacy behavior) on Android 10 (API 29):

  • emulator running Android 10 (API 29)

but does NOT work as before on Android 11 (API 30):

  • emulator running Android 11 (API 30)

i.e. on Android 11, it no longer supports the legacy behavior fully - details:

  • the app can read the files it had created before

  • but the app cannot write files in the old location

  • the app cannot delete/rename files in the old location

Essentially the app retains access to the old top level folder in read-only mode only.

This means that once you target Android 11 (API 30) - you will be able to copy over the old files (to the Music or Downloads "shared storage" folder using MediaStore methods), but you will NOT be able to clean up the old files (since will not have write access).


Conclusion

This means there IS a way to make your app work as before for storage (legacy behavior) - on Android 10, and on Android 11.

Just target Android 10 (API 29) - with build.gradle:

compileSdkVersion 30

targetSdkVersion 29

This will cover devs up to late 2021 or thereabouts - at which point they will be forced by Google to start targeting Android 11 (just as they are being forced to target Android 10 by Nov 2020).

And as described above, if you choose to target Android 11 (API 30), your app will not fully support legacy behavior for storage.

  • the app will still be able to read old files

  • but will not be able to create new files, or delete the files it created before


For those thinking of transitioning files to a MediaStore location

This means if an app wants to transition from old location to new "shared storage" locations (like Music or Downloads using MediaStore methods) - it will be able to copy the files even if it starts targeting Android 11 (API 30).

But if it wants to also cleanup (delete) the old files - it will only be able to do so while it is still targeting Android 10 (API 29) - not once it starts targeting Android 11 (API 30).


Questions

Android 11 emulator did demonstrate bad behaviors - sluggish notifications (not disappearing when they should) - this issue has also been reported by others on stackoverflow.

Same app targeting Android 11 misbehaves when run on Android 11 emulator - widgets misbehave (perhaps this requires some change to code for this to work on Android 11).


r/android_devs • • Sep 29 '20

Discussion Please give an example of Composition over Inheritance in regards to Android Development.

13 Upvotes

r/android_devs • • Sep 15 '20

Off topic Europe’s top court says net neutrality rules bar ‘zero rating’

Thumbnail
techcrunch.com
13 Upvotes

r/android_devs • • Sep 10 '20

Coding Understanding the internals of Lottie Android and the Loading and Rendering of the Animation file

Thumbnail
youtube.com
13 Upvotes

r/android_devs • • Aug 24 '20

Off topic Understanding the internals of Android Stack Architecture and how it relates to Linux

Thumbnail
youtube.com
13 Upvotes

r/android_devs • • Aug 15 '20

Article A backstory, history and interesting details on Google Play Services for Android

13 Upvotes

Introduced in 2012, Google play services is an API framework provided by Google on top of Android.

Internally called GMS Core, Play Services is primarily backed up by Google servers.

Providing access to Google Drive, Google Cloud Messaging, Google Pay, Google Play Game Services as well as APKs for core background services such as GoogleOneTimeInitializer, SetupWizard, GooglePackageInstaller and many more of them, it is a way for Android Developers to get Native Android Development experience to talk to Google Backend servers and stuff that’s run by Google.

Prior to Play Services’ existence, you would go directly to Google Servers and communicate with REST APIs and do JSON parsing yourself. A lot of effort and a lot of low-level mechanisms Android Developers would struggle with.

One of the few things that Play Services made available is that you don’t have to do JSON parsing yourself, you get a nice JAVA data structure to deal with.

Another cool thing is adding Offline writes, so if you want to write something to the cloud you call API in play services and it stores in local device database for you and gets to cloud as soon as the network constraints are satisfied. If you are offline or have a bad network, play services will handle retries.

Play Services is delivered through Google Play Store, so updates to plugins or libraries can happen on regular basis and the Android Team can update the implementation details of the code on devices that do not get System Image Updates. The OS itself is not updated but only the Play Services on the fly.

What makes it to Google Play Services?

The primary goal is to put things backed by Google Services. So something like Volley, RecyclerView libraries won’t be added to Play Services as they are not specific to Google services.

How does the communication work between an Android App and Play Services?

The Android app and services run in separate processes for security, stability, and memory management reasons, but they need to communicate and share data. This is where the Binder mechanism is used.

The Play Services library primarily sets up the IPC link between your application running in your process and the play services application running in a separate process and then API calls are made that go through Binder across to the implementation running in Play Services process.

Google Play Services APIs primarily are set up to be asynchronous.

What is the MIN SDK Version for Play Services?

In 2014, the Play Services had support up to Ginger Bread, Version 9. In 2020, the support seems to be up to Jelly Bean. Older Versions of Android are locked to the last Play Services version that they support.

Exploring the case of Closed-source, OEMs, and silent updates.

Getting LG, Samsung, Xiaomi, and the other OEMs to update their devices to the latest version of Android is difficult. By the time the OEMs get the new version, port their skins over, ship a build to carriers, and the carriers finally push out the over-the-air update, users are restrained from experiencing the latest versions.

If the device isn’t popular enough, this process doesn’t happen at all. Updating a phone is a massive project involving several companies.

Since it’s really hard to push out an Android update, Google’s solution is to sidestep the process completely with Play Services.

Play Services has lots of permissions. It’s kind of a system-level process. Play Services constantly runs in the background.

Play Services has its’ own update mechanism that the user cannot control. The whole point of the Play Service update is to not let the end-user know about its’ updates.

Original equipment manufacturers are not allowed to modify the Play Services. It’s not open source as it is part of the Google package.

When you can update services without having to update a System Image, it is a win-win for end-user and Google and the OEMs.

Play Services is only available to smartphone OEMs through a license with Google, which OEMs need to apply for once they pass the Android Compatibility Test Suite and Google Test Suite on a per-device basis.

Since the inclusion of GMS and GMS Core is behind a license, and practically all major apps have grown to be reliant on Play Services and its APIs for many of their core functions, Google retains complete control of the Android ecosystem despite Android being open-sourced as an OS.

It is likely that, as an Android user, not in China, you cannot practically use Android without Google, given that you would lose out on Google Sign-in, Admob, Google Maps, nearly all Google Apps.

One of the popular alternatives though not complete replacement to Play Services is the Micro G project. It is the re-implementation of Google’s proprietary Android user space apps and libraries.

On an ending note, Google Mobile Services is a collection of Google applications and APIs that help support functionality across devices.

These apps work together seamlessly to ensure your device provides a great user experience right out of the box and this also means Google has full control over each and every Android Phone despite the open-source.

by androiddevnotes 

at Twitter

Open-source: 

at GitHub

YouTube Video by androiddevnotes:  

https://www.youtube.com/watch?v=C2jeQVVZmAU

Article for Medium Users by androiddevnotes:  

https://medium.com/androiddevnotes/google-play-services-under-the-hood-android-3b781d325309

References:

Android Developer: https://developers.google.com/android/guides/overview

Arstechnica: https://arstechnica.com/gadgets/2013/09/balky-carriers-and-slow-oems-step-aside-google-is-defragging-android/

Wikipedia: https://en.wikipedia.org/wiki/Google_Play_Services

Binder: https://www.youtube.com/watch?v=Jgampt1DOak

XDA: https://www.xda-developers.com/huawei-hms-core-android-alternative-google-play-services-gms/

Android backstage podcast: http://androidbackstage.blogspot.com/2014/02/tor-norbye-and-chet-haase-are-joined-by.html

Thank you for Reading : )


r/android_devs • • Aug 09 '20

Discussion Those who are getting started on Android Development, what can be done to make your life easier?

13 Upvotes

What do you wish for to exist, that would make your Android Dev journey much more pleasant?

Apart from the official docs or official materials, what can other devs or content creators create so you will have a good understanding of Android Dev as a whole?


r/android_devs • • Aug 07 '20

Help Special FU to Xiaomi for this MIUI 12 specific crash on app startup

Thumbnail bubblesoftapps.com
13 Upvotes

r/android_devs • • Jul 04 '20

Future talk X-post: Android R might eventually cause a lot of harm for backup and file-manager apps on rooted devices: can't read from /data/data : androidapps

Thumbnail reddit.com
13 Upvotes

r/android_devs • • Jun 30 '20

Coding New library: Track - Simple on-device event tracking for Android

13 Upvotes

After implementing several small SharedPreferences solutions for persisting simple data, I decided to write a small library to make this kind of stuff dead-simple.

The main focus is to persist things like:

  • When was the app last run?

  • Is this the first time this version of the app is run?

  • Has the user seen screen X before?

  • Which dropdown choice did the user last select?

  • How often does the user make a certain choice?

You get the idea.

The library offers a kind of key-value storage which allows for both reading and writing a single value per key, as well as multiple values per key. In addition to the keys and values, each record also contains the app version and timestamp.

It is built on top of a simple SQLite database, has very few transitive dependencies, is well tested, uses a permissive MIT license, and I would love to hear your feedback on it :)

Track on Github


r/android_devs • • Jun 23 '20

Discussion Why Choose Single Activity Applications?

13 Upvotes

I've given it some thought and I never found a set of definitive reasons why Google has pushed single-activity applications. I can list a few benefits but I'd like some help clarifying and understanding the pros and cons.

Single Activity Pros

  • Fragments can share view elements

  • Easier control transition animation

  • Fragments are composable


r/android_devs • • May 19 '20

Store stories The importance of being able to make noise to get listened :)

Thumbnail
reddit.com
13 Upvotes

r/android_devs • • Feb 20 '26

Question MVI doesn't have ViewModel?!!

12 Upvotes

I usually use MVVM with a single state + Kotlin Coroutines/Flow.

A senior developer told me MVI doesn't have a viewModel in my technical interview, and I am lost. All MVI implementations I can find have a ViewModel with the reducer inside it.

Do we call it by another name in MVI?

Did he mean a specific variation?

What am I missing?

It will be great if you provide a resource or a repo so I can see the implementation in action.

Ps: I am planning to text him for some resources or a discussion to get his pov, but I wanted to do my research first.


r/android_devs • • Dec 05 '25

Discussion I am writing a book about Jetpack Compose performance

12 Upvotes

There is not a lot of literature about this yet except the official Google docs and codelabs. I went through those and they are very welcome, but they seem to stay very shallow about all the topics. I think there is room for a full guide on how to measure and monitor Compose performance, how to identify pain points, how to fix them, tooling, etc. My plan for this book is the following:

- I really want the book to be useful for day to day work. Theory is nice and all but I really want people to find real applicable action points for their work.

- I want the book to be accurate, of course. When I wrote Jetpack Compose internals, I got many people from the Compose team at Google to review the content, since otherwise what is the point of writing it?

- I want to cover how to identify and detect performance regressions, and how to measure and monitor performance. I have observed that many devs and their teams often overlook perfromance. We focus a lot on adding new features, UI, architecture, testing, automation, tooling... and what not. And then we give performance attention only when something becomes drastically slow or users start to complain and post bad ratings. Many teams do not regularly measure or monitor performance, and some not even test their app on a wide range of devices either. The result of this is that issues often go unnoticed forever or until late in the process, when they are already really hard to fix. This is definitely risky. If anything, I'd like this book to become the guide to prevent this from happening.

- I want to shift people's attention to measuring the actual ultimate goal: performance. Monitoring things like number of recompositions can be a start but it is a bit risky, since devs can end up thinking they have an issue when they don't. Not every single unnecessary recomposition is a problem.

Since we all write Compose code now, I think it is the perfect time to write this book. Any feedback and ideas are more than welcome!

I'll likely be prelaunching this book via Leanpub, so if you want to get notified you can just register in https://leanpub.com/composeperformance


r/android_devs • • Nov 01 '25

Article Google makes first Play Store changes after losing Epic Games antitrust case - Ars Technica

Thumbnail
arstechnica.com
12 Upvotes

r/android_devs • • May 26 '25

Help Needed Resume review for Android Developer position, having around 3 years experience.

Post image
12 Upvotes

Hey everyone, can you guys please review my resume, thinking of applying for a new company, current package is 9LPA, and what should I expect??


r/android_devs • • May 06 '25

Discussion Androids new designs: Material3 expressive

Post image
12 Upvotes

r/android_devs • • Feb 10 '25

Discussion Let's talk about one-off event

12 Upvotes

I've already asked about this in the Discord channel, but I wanted to continue the discussion here and leave something searchable for others.

/u/Zhuinden mentioned that:

google thinks you should never use one-off events and instead should always use boolean flags if you're not a dummy then you know you can use a Channel(UNLIMITED).shareIn(viewModelScope)

Which I agree, but he personally prefers using an event emitter.

But let's assume we can't use a library and must rely on a Channel.

  • Why UNLIMITED instead of BUFFERED?

  • Why .shareIn() instead of .receiveAsFlow()?

How would you handle event collection in the UI?
What would be the correct approach?

Would you use:

vm.event.collectAsState()

or

LaunchedEffect(Unit) {
    vm.event.collect { }
}

or

LaunchedEffect(Unit) {
    lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) {
        vm.event.collect { }
    }
}

Or is there any other way that you would do differently?

I'd love to hear your thoughts!


r/android_devs • • Oct 08 '24

Article Epic vs Google: A New Era for Android App Stores

12 Upvotes

Epic Games just won a major battle against Google! Google Play will now open its doors to third-party app stores. What does this mean for developers? More choices and freedom to set their own app prices!.

Read More: https://gorkemkara.net/epic-vs-google-a-new-era-for-android-app-stores/

#AndroidDev #MobileApps #GooglePlay #EpicGames #PlayStore #AppStore #Google


r/android_devs • • Aug 20 '24

Discussion How I explain that VM aren't meant to pass parameters?

12 Upvotes

Hey all! I might be on the wrong side here, but AFAIK you are not supposed to use ViewModels to pass parameters, right?

I have a teammate who says that we should pass parameters through VM, meaning that you instantiate the VM beforehand, set whatever values you want to pass, and then pop the Fragment. Something like this:

vm = // Instantiate your VM activity-scoped
vm.param1 = "foo"
vm.param2 = "boo"
myFragment = SomeFragment()
myFragment.show()

Then, SomeFragment picks up whatever parameters we set on the VM.

I think VM are not meant to be used like this, I think you go with the usual approach of using a Bundle and passing whatever parameters you need through the arguments.

How can I explain to my teammate that things are not done like this? Or maybe I'm mistaken and they are right?

Thanks,


r/android_devs • • Apr 01 '24

Article Alexsandra Sikora: Most tech content is bullshit

Thumbnail
aleksandra.codes
12 Upvotes

r/android_devs • • Mar 23 '24

Question Contribution to open source community

12 Upvotes

Hi everyone, I need to work on some open-source projects to gain experience in the open-source world. How to start and where to start. Can anyone guide me about this? How to figure it out? Would be a huge help.