Closed tjeffree closed 10 months ago
Just want to leave a note here to mention our app passed review on the Play Store using this fork.
Oh great, I'm gonna shelve my idea of a big rewrite and just gonna merge all prs and make a release this weekend :)
@tjeffree hey. looks like there are some merge conflicts. You think you could get that fixed? Cheers!
I'll have a go
Ok that's those resolved. I haven't retested all the apps but did check the new ones: Sygic Truck, Flitsmeister and Truckmeister.
Cheers, I'll make sure to double test before releasing!
Interesting. I'm doing some tests and looks like some maps are simply not showing with this method. Here's the list of missing ones:
Trying to figure out why that is hmm
Seems like some maps might have different types of intents.
What about something like context.packageManager.getPackageInfo(map.packageName, 0)
?
That does not seem to be using sensitive permissions afaik.
@mattermoran Just installed Osmand to see what was up with that one. I originally got the URL schemes from the iOS side I think.
Looks like the Android version doesn't support osmandmaps://
, however it does support geo://
the same as a few of the others. Can you try changing them to geo://
and see if they show up?
I decided to go with this as it seems to be working fine and not using any special permissions
private fun getInstalledMaps(): List<MapModel> {
return maps.filter { map ->
context.packageManager?.getLaunchIntentForPackage(map.packageName) != null
}
}
This change avoids the use of packageManager.getInstalledApplications() and instead relies on testing intents.
From what I could find the safest method was to simply test the intents. It's mentioned in a various places but isn't exactly explicit:
https://developer.android.com/training/package-visibility/use-cases https://developer.android.com/guide/components/intents-common
This may or may not make a difference in Google's review process but figured it was worth sharing just in case.