Closed tjeffree closed 1 year ago
Looks good! I'll do a quick test and release if all's well :)
@mattermoran I've got a second branch on the go to update this plugin to maybe better support more recent changes in the visibility of packages on Android.
In short it avoids the use of packageManager.getInstalledApplications()
and instead relies on testing intents. The developer would also need to add the list of possible packages to their <queries>
section in the AndroidManifest.xml. But my hope is that this will more easily pass Googles review process.
If you get a chance, could you take a look here and see what you think? https://github.com/mattermoran/map_launcher/compare/master...tjeffree:map_launcher:detection-refactor
Interesting. So using the packageManager
is ok long as .getInstalledApplications
not being called? In that case I guess it might be better to go with your solution but would need to make sure it works on different versions of android.
Regarding <queries>
thing would also need to be defined in the app's manifest given that it's already in the plugin's?
So using the packageManager is ok long as .getInstalledApplications not being called?
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
Regarding
thing would also need to be defined in the app's manifest given that it's already in the plugin's?
That's just my gap in knowledge of Flutter plugins. So that's inherited by the app that's using the plugin, that makes sense.
AFAIK manifests from different plugins and the app's get merged into one so as long as queries defined in the plugin it should be alright. We could definitely give this a go and publish as a pre-release to see if there's any issues.
Sure, will do. Thanks.
Released in v3
This pull request adds support for CoPilot.
https://play.google.com/store/apps/details?id=com.alk.copilot.mapviewer
https://apps.apple.com/us/app/copilot-gps-navigation/id504677517
Tested on Android and iOS.