Getting errors or crashes right after updating dependencies and pushing the update to production can be very frustrating!
Recently, while migrating one of my App ‘InSaver!’ from Java to Kotlin, I stumbled upon a strange, like very strange issue.. 😕
I had a SettingsActivity and a SettingsFragment nested in the same Activity which extended PreferenceFragmentCompat.
Everything was just Fine in Java & then just a quick Convert to Kotlin took so many hours to get fixed!
So, what was all the ruckus about?
Well my SettingsFragment crashed as soon as it hit the onCreatePreferences() method..
The only thing that logcat showed was that the Bundle in the constructor i.e. savedInstanceState was null 🙄.
This shouldn’t have happened because I used the built-in Refactor to convert Java to Kotlin as this class had nothing much which needed my manual interaction..
Somewhere on the stackoverflow, I found out that the Bundle i.e the savedInstanceState variable is “NULLABLE”.
The automated refactor somehow ‘forgot’ or maybe it was an other issue.. I don’t know that yet, to put an ? to Bundle object, hence making it @NonNull which made Kotlin fire the crash..
If that’s happened or is happening to you, just mark the Bundle as well as the RootKey as Nullable like –
If you’ve ever used VirusTotal to scan your Apps (.apk), at some point you would’ve seen an irritating result with ‘Babable’ Antivirus marking your App as unsafe with “PUP.HighConfidence”.
If you observed, I used the word ‘Notify’ because you should Never force your User to Update the App unless it’s too important!
For example: If your App is server sided & you currently changed some API stuffs or the updated version fixes a critical security issue then only you should force a user to Update App!
I guess you have read the Title, so let’s get started!
A few months ago, I received a Mail from the Admob department stating that they had ‘Disabled Ads Serving’ to my App ‘Status Saver’!
Few Days after I published my App ‘Status Saver’ & it got a lil bit attention on the Google PlayStore, I received a mail from a Company / Organization named as “FMFG” claiming that I had used a Feature (Push Notification) in my App whose Patent was registered by their client…
Wow! (like Seriously?) 😑
That guy even demanded a ‘Fee’ & that was somewhat Suspicious!
Below is the Mail Content…