Android developer's log, Stardate 2023.1: 👽
it all started with an email from Google Play regarding various clarifications to their Target API Level Policy and how apps that fail to comply new requirements will experience "reduced distribution" on the market... 👀 ....well.......
Oh... I get it - it's one of those emails that makes you do stuff.... well f*** me.. 😅
Let me walk you through this: the above mentioned Google Play's Target API Level Policy states the following:
- New apps and app updates MUST target an Android API level within one year of the latest major Android version release. New apps and app updates that fail to meet this requirement will be prevented from app submission in Play Console.
- Existing Google Play apps that are not updated and that do not target an API level within two years of the latest major Android version release, will not be available to new users with devices running newer versions of Android OS. Users who have previously installed the app from Google Play will continue to be able to discover, re-install, and use the app on any Android OS version that the app supports.
Step 1: Java to Kotlin
Step 2: @Composable
Step 3: "SharedPreferences" vs "DataStore"
Back in the days we had something called "SharedPreferences" - an interface for accessing & modifying user preference data. This key-value pair concept has been used since the start of Android development. It had its flaws, but it really wasn't that hard to master or implement, e.g.:
- it doesn't provide type safety
- it's not safe to call from UI thread
- can't signal any error
- can't handle data migrations
|Don't believe me? Just check out the comments...|