r/android_devs • • Sep 17 '21

App ban I can't contact Google for my App Suspension

11 Upvotes

Hello

I released 2 apps one named Lotto Myanmar and other Lotto Rwanda and both of these apps got suspended because of app repetitiveness.Both have their status changed to Suspended by Google. So I appealed both of them at the same time. I received an email for my Lotto Myanmar appeal ticket and Google Support changed my Lotto Myanmar app status to Removed by Google. Then I change release the country of it to only Mynamar and sent for a review and it passed the review and it's status is Liv now. For my other Lotto Rwanda app Google Support says they sent an email about it but I didn't received any email. Also when I am trying to appeal a second time I can't do it. I sent an email to [email protected] but they say they can help only if sent by a appeal contact form but that contact form only sends me to my app page whichc is in suspension and I can't appeal . How can I contact Google Support.


r/android_devs • • Jun 04 '21

Resources Introducing Lyricist: the missing I18N/I10N library for Jetpack Compose

Thumbnail
github.com
11 Upvotes

r/android_devs • • Mar 19 '21

Help In the Hilt codelabs its mentioned "Warning: Hilt does not support retained fragments. " What is the significance of it?

11 Upvotes

What is retained fragments and when do we use it? And Why Hilt cannot support it? Is it something to worry about?


r/android_devs • • Mar 14 '21

Publishing TIL REQUEST_IGNORE_BATTERY_OPTIMIZATIONS

11 Upvotes

r/android_devs • • Feb 21 '21

Coding Random Musings on the Android 12 Developer Preview 1

Thumbnail commonsware.com
11 Upvotes

r/android_devs • • Jan 08 '21

Event Android Worldwide - January 2021 Event Schedule

11 Upvotes

As it's been since last year, every 2 months there's an Android Worldwide event with free registration, virtual chat, and tech talks! This time, there are 4 events to join.

On January 19th:

The events are scheduled to start as follows:

Hope to see y'all there, whichever timezone and event is most suitable for you! :)


r/android_devs • • Jan 03 '21

Coding Harmony v1.1.3 - Multiprocess SharedPreferences

11 Upvotes

After several procrastinating months (partially due to the pandemic), I have finally gotten around to getting this release done: https://github.com/pablobaxter/Harmony

Shameless spiel about Harmony -- Harmony is a thread-safe, multi-process safe SharedPreferences implementation. It began as a challenge to see how well FileObserver and FileLock worked in Android, and slowly morphed into what it is now.

What's new?

I made several improvements on Harmony, with the main one being the time to replicate changes made to SharedPreferences across all processes of the app (now ~150 ms on average). The more minor ones are bug fixes with crashes, and not being able to store more than 64KB strings.

How does it work?

The basic gist of it... It writes changes made via calls to apply() or commit() as single transactions to a file, which is listened to by a FileObserver object, notifying any process of the changes to the file. In turn, these other processes read the transaction from the file, and apply the changes to memory. When this "transaction" file reaches a certain size, the state of all preferences are flushed into a "main" file.

Wait... reading and writing to a file at the same time? Sounds dangerous.

I'm able to do so with the use of FileLock, which I use as a reentrant lock between processes (check out https://github.com/pablobaxter/Harmony/blob/main/library/src/main/java/com/frybits/harmony/internal/HarmonyFileUtils.kt). A simple synchronized block prevents multiple read/writes within the same process.

Any feedback, questions, reviews, comments, or criticism would be greatly appreciated!

Edit - Formatting


r/android_devs • • Dec 04 '20

Coding PSA: Android Gradle Plugin 7.0 will require Java 11

11 Upvotes

If you are using Java 8 to compile your app, starting from Android Gradle Plugin 7.0 (the next one after 4.2) Java 11 will be required. This change will make effect in Android Studio 2020.3.1 Arctic Fox (currently in Canary and the next one after 4.2).

With AGP 7.0.0-alpha01 we are changing the minimum required Java programming language version to Java 11. We are announcing this early in the Canary schedule and many months ahead of the stable release to allow developers time to get ready.

If you have pipelines running in Java 8, maybe it is a good idea to start migrating it to Java 11 now so the transition can be smoother.

For more information:

https://android-developers.googleblog.com/2020/12/announcing-android-gradle-plugin.html

https://android-developers.googleblog.com/2020/12/announcing-android-studio-arctic-fox.html


r/android_devs • • Oct 25 '20

Help Is there an equivalent of `.doFinally {}` with Kotlin Coroutines?

11 Upvotes

A very common pattern with RxJava is to use .doOnSubscribe {} to show a loading indicator, and .doFinally {} to stop showing a loading indicator.

There doesn't seem to be a simple way of doing this in Kotlin, unless we wrap the coroutine in a try {} finally {} block looking for cancellation exceptions.

Does anyone here have an experience with this pattern, that ensures that the loading indicator stops showing even if the job or the scope is canceled?


r/android_devs • • Oct 23 '20

Help Somebody posted my app on MiStore(Xiaomi, 500+ downloads) and V-AppStore(Vivo 100K+downloads), I have not yet checked on other app stores. What can I do about this.

11 Upvotes

r/android_devs • • Oct 09 '20

Discussion Professional development as a junior in a legacy(?) code base

11 Upvotes

Greetings devs!

I wanted to share some thoughts I had lately in my mind and wanted to discuss this with other fellow Android developers. Sorry for the long post but I feel like a great discussion can come out of this, so please go ahead and read my post :)

I am a fresh out of uni person, who started working earlier this year. In my last year of uni, I got very interested in Android development, and naturally I started learning more about it mainly by official Google sources. This of course means that my first taste of Android was directly with the Jetpack libraries. The only way I learned how to do stuff was with the classic Google recommended way of all the classic stack (or buzz words) of:

  • Kotlin

  • Coroutines (or even RxJava)

  • ViewModels

  • Repository layers

  • "Dumb" View layer

  • Importance of process death

  • DI

  • ViewBinding (or DataBinding)

  • Room

  • ConstraintLayouts

  • Retrofit

  • LiveData (or really the concept of UI reacting to data changes)

  • The importance of Testability

  • No Singletons

  • Material Design

  • and more

Going into my first job, and only knowing about what I mentioned above, I was expecting that this is what Android development looks like and always looked like. Much to my surprise however, literally every single thing I mentioned above was *not* what I encountered. What I did encounter instead is:

  • Manual new Threads directly for any network call without any logic for canceling in case the calls are not needed anymore

  • Everything happening inside the fragments/activities (god classes)

  • No sense of viewmodel/repository layer or anything similar, just singleton classes that take care of different stuff that the fragments directly call getInstance() on

  • No handling of process death in any way

  • no sense of DI whatsoever (everything is a Singleton as discussed earlier)

  • normal findViewById everywhere (this is okay though, not such a big deal)

  • Realm with calls happening on the main thread (not always properly using managed/unmanaged objects)

  • Super nested RelativeLayouts/LinearLayouts etc.

  • Custom network stack manually embedding headers etc. on the requests sent instead of Retrofit

  • Global Event busses that handle every single network call with fragments manually registering/unregistering to callbacks from those global objects

  • No livedata as discussed since everything happens in the fragment and the views are directly mutated for all possible states

  • No tests whatsoever (and impossible to even write tests due to architecture set)

  • No proper usage of material design

  • And more I am probably missing

Now with all that said, I do understand that the "Google way" is not necessarily the absolute single source of truth and does not necessarily mean that this is the "correct" way to do things, but as someone new to the platform, it was the easiest way to get into this ecosystem so it is what it is. Needless to say that I have so far had a very hard time adapting to everything and I feel like I am super slow on doing even the basic stuff due to how much time is required to wrap my head around all the custom logic that is written for everything.

So for the discussion part, I have some questions in mind that I would like to hear opinions on.

  1. Is this what most Android code bases feel like in the real world? Have I joined the Android environment in a just very "lucky" timing to have all the resources available to me to learn how to do stuff in some "recommended" way and I just missed the times when everything was custom and there were no standards? Were most of my efforts to get familiar with all these concepts not something that really applies to real life environments? Is the way forward trying to learn more "traditional" (if that's the correct term) Android development in order to feel more comfortable working in this field?

  2. If this is not how things should be, how would someone like me achieve the absolute best way to improve myself despite all that was said above in order to still improve professionally so that I will still be employable by other companies that are following a more standard/modern approach to developing their apps.

I hope to hear some opinions on this topic, feel free to express yourselves however you like. I am open to the idea that I am wrong about this entire thing and that I should learn how to adapt to the current environment. But I would also be super happy to hear opinions on how to make the best out of a seemingly tough situation.


r/android_devs • • Sep 25 '20

Coding Analyzing the Source Code - How Glide Image Loading Library works Internally - Article

Thumbnail
codingwithmitch.com
11 Upvotes

r/android_devs • • Sep 23 '20

Help How many threads does the app that started Activity have at least?

11 Upvotes

r/android_devs • • Aug 30 '20

Fifty shades of Publishing New publishing record on Play store: 3 minutes to rollout an update directly in production!

11 Upvotes

Oh, f@ck, something bad is going to happen, I can feel it.


r/android_devs • • Aug 27 '20

Coding Lifecycle-aware wrapper over EventEmitter, for modeling one-off events.

Thumbnail
github.com
11 Upvotes

r/android_devs • • Aug 20 '20

Store issue Update keeps being rejected.

11 Upvotes

So I have an app on the Play Store currently and I just can't seem to update it. It keeps getting rejected over the same reasons: Contains assets from a popular brand.

My app is Blizzard Games Profiles (shows profiles from multiple Blizzard games using their API) so obviously there are assets from their game...

I tried appealing with Blizzard's legal faq which states we are able to use the assets as long as they are not modified and not commercially used but I just keep getting the same automatic response that my update still violates some conditions.

Also the update was purely functional, no changes in images, only bug fixes and it has been live on the Play store for a year almost so why now?

Not sure what to do next.. any suggestions?


r/android_devs • • Aug 05 '20

Off topic Google to add a nag notification in Android if you haven't used Chrome for a while

Thumbnail
neowin.net
11 Upvotes

r/android_devs • • Aug 03 '20

Help What changes do I need to make as per the new Google play Policy. I have a camera app that requires read and write external storage permissions

11 Upvotes
  • I need Camera permission because its a camera app

  • I need to store clicked images and to open those images when the user clicks the gallery hence the read and write external storage permissions

I don't collect any data. So I am a little confused, should I update my app explaining to user the use of every permission.


r/android_devs • • Jul 18 '20

Discussion Realtime blurring in Android

11 Upvotes

I am currently in a project where some design elements should have blurred background that updates as the user scrolls on a background with multiple images. I know Android generally doesn't play well with blurring and that its OK for static content but I expected it do be in a better state today as the phones itself are more than capable to handle it.

The implementation was done with some random library I found on GitHub, and it uses the classic Renderscript to make it work. The effect even worked very well on my OnePlus and the designer was very happy that we could be as close to the design as the iOS counterpart.

However, I took another phone one day to test stuff (Samsung Galaxy S8+) and the performance was horrible. Scrolling was laggy and choppy and we had to use fallback graphics because the user experience was really bad. I was really surprised that a device that was the flagship 2-3 years ago can't handle realtime blur.

I'm guessing the issue lies within Android since the device itself should be able to handle it. The developer of the lib did benchmarks on Nexus 5 and it could maintain 60 fps without issues.

My question is, is there a specific reason why Android still doesn't have native blur support (like imageView.blur(radius, sampling)? I guess it should be done in C or C++ since its a lot of calculations, but I can't imagine Google not having the capacity to find a way... Can anyone share their experiences with blurring? Maybe some hacks/libs that worked really well?


r/android_devs • • Jul 09 '20

Off topic X-post: Apple Makes a Major Privacy Move by Allowing Users to Disable Ad Tracking and Have Greater Insight Into App Permissions : apple

Thumbnail
reddit.com
11 Upvotes

r/android_devs • • Jul 08 '20

Publishing Google play policy updates for July

Thumbnail
youtube.com
11 Upvotes

r/android_devs • • Jul 06 '20

Article Optimize the build speed for your Android project

Thumbnail
crazylegend.dev
11 Upvotes

r/android_devs • • Jul 03 '20

Help How do you stop observables in ViewModels from sending updates after you've navigated to another screen?

11 Upvotes

I have an issue with observables in ViewModels continuing to sending updates to the ViewModel even though the Fragment has been stopped and I've navigated to another screen. Since the observable subscriptions are still alive in the ViewModel, it's consuming resources and memory receiving updates that the user can't see since the Fragment is currently not visible.

A dumb example to help understand my issue, observing a list of books from a database table.

class BookViewModel(bookRepo: BookRepository) : ViewModel() {
    private val disposables = CompositeDisposable()

    val books = MutableLiveData<List<Book>>()

    init{
        disposables.add(bookRepo.getBooks()
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe { bookList ->
                    books.value = bookList
                }
    }

    override fun onCleared() {
        super.onCleared()
        disposables.clear()
    }
}

The subscription inside the init block only gets cleared when the BookViewModel is cleared. So say I navigate to another screen in the app, then this subscription will still remain alive and continue sending updates from the books table to the BookViewModel.

I'd like to stop receiving those updates from the subscription since I don't need them anymore as I've moved on to another screen. The last known list of books will be saved in the books LiveData. When I eventually return to this screen, the saved list of books is displayed immediately while I'd like a new subscription to be started to retrieve the latest list of books from the books table.

Is there any way to go about fixing this that wouldn't involve overriding onStart and onStop in the Fragment?

_____________________

Edit: u/Zhuinden pointed me to a nice solution in the following SO https://stackoverflow.com/q/62674966/2413303 Thanks for the help everyone!