Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This plugin does not work on Andorid 11 #266

Closed
abhishek-tiwariddn opened this issue May 31, 2021 · 4 comments
Closed

This plugin does not work on Andorid 11 #266

abhishek-tiwariddn opened this issue May 31, 2021 · 4 comments

Comments

@abhishek-tiwariddn
Copy link

abhishek-tiwariddn commented May 31, 2021

On using ionic 5 with Launch navigator, Map lists are not working and I'm getting the logs are here as below

2021-06-02 18:19:47.673 10311-10540/com.movemanger D/LaunchNavigatorPlugin: Plugin action=availableApps

--------- beginning of system

2021-06-02 18:19:47.674 492-1688/system_process I/AppsFilter: interaction: PackageSetting{90d363d com.movemanger/10156} -> PackageSetting{4d65d04 com.google.android.apps.maps/10116} BLOCKED
2021-06-02 18:19:47.681 10311-10540/com.movemanger D/LaunchNavigator: waze is not available
2021-06-02 18:19:47.689 492-1688/system_process I/system_server: oneway function results will be dropped but finished with status OK and parcel size 4
2021-06-02 18:19:47.689 492-1688/system_process I/chatty: uid=1000(system) Binder:492_11 identical 1 line
2021-06-02 18:19:47.689 492-1688/system_process I/system_server: oneway function results will be dropped but finished with status OK and parcel size 4
2021-06-02 18:19:47.691 10311-10382/com.movemanger D/OpenGLRenderer: endAllActiveAnimators on 0xe1b66f90 (RippleDrawable) with handle 0xb5b4f0b0
2021-06-02 18:19:47.703 10311-10540/com.movemanger D/LaunchNavigator: moovit is not available
2021-06-02 18:19:47.704 10311-10540/com.movemanger D/LaunchNavigator: lyft is not available
2021-06-02 18:19:47.704 10311-10540/com.movemanger D/LaunchNavigator: baidu is not available
2021-06-02 18:19:47.704 10311-10540/com.movemanger D/LaunchNavigator: uber is not available
2021-06-02 18:19:47.704 10311-10540/com.movemanger D/LaunchNavigator: cabify is not available
2021-06-02 18:19:47.704 10311-10540/com.movemanger D/LaunchNavigator: maps_me is not available
2021-06-02 18:19:47.705 10311-10540/com.movemanger D/LaunchNavigator: taxis_99 is not available
2021-06-02 18:19:47.705 10311-10540/com.movemanger D/LaunchNavigator: gaode is not available
2021-06-02 18:19:47.705 10311-10540/com.movemanger D/LaunchNavigator: citymapper is not available
2021-06-02 18:19:47.705 492-3705/system_process I/AppsFilter: interaction: PackageSetting{90d363d com.movemanger/10156} -> PackageSetting{4d65d04 com.google.android.apps.maps/10116} BLOCKED
2021-06-02 18:19:47.707 10311-10540/com.movemanger D/LaunchNavigator: google_maps is not available
2021-06-02 18:19:47.708 10311-10540/com.movemanger D/LaunchNavigator: yandex is not available
2021-06-02 18:19:47.708 10311-10540/com.movemanger D/LaunchNavigator: sygic is not available
2021-06-02 18:19:47.708 10311-10540/com.movemanger D/LaunchNavigator: here_maps is not available
2021-06-02 18:19:47.708 10311-10540/com.movemanger W/PluginManager: THREAD WARNING: exec() call to LaunchNavigator.availableApps blocked the main thread for 35ms. Plugin should use CordovaInterface.getThreadPool().

Now the same app is working fine on Andorid 10 all devices. Let me know any further update to this plugin has added?

@jlgarcia-vs
Copy link

Same problem for me.

@modship
Copy link

modship commented Jun 8, 2021

Hello, i have found solution. @visiblesoft-org @abhishek-tiwariddn

My setup :

❯ ionic info

Ionic:

  Ionic CLI                     : 5.4.16
  Ionic Framework               : @ionic/angular 5.6.8
  @angular-devkit/build-angular : 12.0.3
  @angular-devkit/schematics    : 12.0.3
  @angular/cli                  : 12.0.3
  @ionic/angular-toolkit        : 4.0.0

Capacitor:

  Capacitor CLI   : 3.0.0
  @capacitor/core : 3.0.0

Plugin use queryIntentActivities function for lists avalaible apps :

   private void discoverAvailableApps(){
       Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(GEO_URI));
       availableApps = new HashMap<String, String>();
       List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0);
       for (ResolveInfo resolveInfo : resolveInfoList) {
           String packageName = resolveInfo.activityInfo.packageName;
           String appName = getAppName(packageName);
           if(!supportedAppPackages.containsValue(packageName)) { // if it's not already an explicitly supported app
               logger.debug("Found available app supporting geo protocol: " + appName + " (" + packageName + ")");
               availableApps.put(appName, packageName);
           }
       }

       // Check if explicitly supported apps are installed
       for (Map.Entry<String, String> entry : supportedAppPackages.entrySet()) {
           String _appName = entry.getKey();
           String _packageName = entry.getValue();
           if(isPackageInstalled(_packageName, packageManager)){
               availableApps.put(supportedAppNames.get(_appName), _packageName);
               logger.debug(_appName+" is available");
           }else{
               logger.debug(_appName + " is not available");
           }
       }
   }

Google has changed the visibility of packages in android 11 Package visibility filtering on Android.

Simply add <queries> in your AndroidManifest.xml like this :

<manifest.....>
     ...

 <queries>
        <intent>
            <action android:name="android.intent.action.VIEW"/>
        </intent>
 </queries>
</manifest>

Problem was solved ! :)

@jlgarcia-vs
Copy link

Hello, i have found solution. @visiblesoft-org @abhishek-tiwariddn

My setup :

❯ ionic info

Ionic:

  Ionic CLI                     : 5.4.16
  Ionic Framework               : @ionic/angular 5.6.8
  @angular-devkit/build-angular : 12.0.3
  @angular-devkit/schematics    : 12.0.3
  @angular/cli                  : 12.0.3
  @ionic/angular-toolkit        : 4.0.0

Capacitor:

  Capacitor CLI   : 3.0.0
  @capacitor/core : 3.0.0

Plugin use queryIntentActivities function for lists avalaible apps :

   private void discoverAvailableApps(){
       Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(GEO_URI));
       availableApps = new HashMap<String, String>();
       List<ResolveInfo> resolveInfoList = packageManager.queryIntentActivities(intent, 0);
       for (ResolveInfo resolveInfo : resolveInfoList) {
           String packageName = resolveInfo.activityInfo.packageName;
           String appName = getAppName(packageName);
           if(!supportedAppPackages.containsValue(packageName)) { // if it's not already an explicitly supported app
               logger.debug("Found available app supporting geo protocol: " + appName + " (" + packageName + ")");
               availableApps.put(appName, packageName);
           }
       }

       // Check if explicitly supported apps are installed
       for (Map.Entry<String, String> entry : supportedAppPackages.entrySet()) {
           String _appName = entry.getKey();
           String _packageName = entry.getValue();
           if(isPackageInstalled(_packageName, packageManager)){
               availableApps.put(supportedAppNames.get(_appName), _packageName);
               logger.debug(_appName+" is available");
           }else{
               logger.debug(_appName + " is not available");
           }
       }
   }

Google has changed the visibility of packages in android 11 Package visibility filtering on Android.

Simply add <queries> in your AndroidManifest.xml like this :

<manifest.....>
     ...

 <queries>
        <intent>
            <action android:name="android.intent.action.VIEW"/>
        </intent>
 </queries>
</manifest>

Problem was solved ! :)

Thank you very much @modship !!!! I will try your solution.
Regards

@dpa99c dpa99c closed this as completed in a665e88 Jun 16, 2021
@abhishek-tiwariddn
Copy link
Author

abhishek-tiwariddn commented Jul 20, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants