Generating a signed build using Android Studio Arctic Fox version 2021.3.1 seem to be a tricky thing to do. I spent several hours just to figure out where the issue is and at the end, I still don’t know what is the exact reason for signing to not work.
Continue reading “Android Studio Arctic Fox not building a signed APK”Category: Android
Creating a bottom sheet dialog with rounded corners and expanding it to full screen
Sometimes even simple and easy stuff can be complex on Android. Such is the case where you want to have a bottom sheet dialog with rounded corners which expands to fullscreen. Here is how I did it on Android 6.
Continue reading “Creating a bottom sheet dialog with rounded corners and expanding it to full screen”Why integration of Google Cast alongside Exoplayer really sucks?
Recently I played around with the integration of Google Cast inside Exoplayer and I was really amazed to see how bad it is and how much it sucks. I decided to write this post with the idea it will help someone else who is also struggling with the Google Cast integration for exoplayer.
Requirements
So the requirements I had for the integration of Google Cast are quite simple:
- Play an item on cast
- Play a list of items – when you press Next you go to the next item
- Forward / Backwards with 30 seconds – so you can skip through the track
- Play / Pause support
- Switch between lists of items – you can player item 2 of List A, you should be able to switch to item 3 of List B
- Switch between phone playback and cast playback – switch from cast to app and from app to cast
- Update the progress when casting – time elapsed should also be updated
- Volume up/down are supported
Migration from Gson to Moshi – small tricky parts
Gson is outdated a bit with the last commit done quite some time ago. We also had implemented the Moshi library in our Gradle dependencies and these are the 2 reasons why we decided to move away from GSON.
Continue reading “Migration from Gson to Moshi – small tricky parts”Publishing a private Android library
Recently I played around with a library that is used in multiple projects. This library has a huge list of dependencies like: coroutines, rxjava, navigation library from Google, material library, custom edit texts that come from 3rd party libraries and many more. Basically this library has also a rich set of screens available to the users that open given certain conditions. But our issues was bigger.
Continue reading “Publishing a private Android library”When can RxJava become a pain in the ass?
The idea of this post is really simple. If you don’t know the details around RxJava – don’t implement it in a project which has the idea of earning money.
Continue reading “When can RxJava become a pain in the ass?”Detecting network change with ConnectivityManager & RxJava
Wonder how to check the network connectivity in Android? There is a new API that you can use but there aren’t many tutorials how to do it. Here is our simple way:
Continue reading “Detecting network change with ConnectivityManager & RxJava”Android Oauth2 token refresh mechanism – OkHttp vs RxJava layering
The RxJava approach
I am currently working on an app where the devs before me took this strange decision in regard to the refresh token mechanism – have a single entry point of the app which is called every time whenever you need to have a fresh token. What I mean is this:
Continue reading “Android Oauth2 token refresh mechanism – OkHttp vs RxJava layering”Execute an RxJava observable only once in a given time period
Problem
Each Android app has an authentication mechanism or at least most of them do. What this auth mechanism does is that it refreshes an access token using a refresh token every N minutes. In our case these N minutes are 7. And now the question is: How do I implement this?
Continue reading “Execute an RxJava observable only once in a given time period”Tricky parts when implementing unit tests for Android in Kotlin
Testing data classes in Kotlin
As we all know, data classes are final by default on Kotlin and if you try to use Mockito and mock such a class, you will get an exception. What you need to do is add this file:
Continue reading “Tricky parts when implementing unit tests for Android in Kotlin”