Android 10 - new location permission
Updated: Jan 13, 2020
Is your app collecting location in the background?
Android 10 Introduced the new IOS like "Allow only when the app is in use" location permission (aka location background permission).
From now on your app will not be able to receive location updates unless the user has explicitly granted the "Allow all the time" permission.
So you might think - hey I'll just use foreground service - well... bad news - it is designed for navigation apps and it will only work if the screen is off while your app was visible, otherwise, you'll get nothing out of foreground service as well.
So what should you do then?
1. if your target SDK is lower then 29 - add the background location to your manifest to your next release. Here is why: https://lnkd.in/g7n2vkp
2. Acknowledge the fact that you will stop receiving location updates in the background for significant portion of your users, and invest time in develop ways to explain why it is vital for your app, and if it is not vital - adjust locations for foreground use only or find alternatives, for example, Transit API can give you some insights.