dpa99c / phonegap-launch-navigator

Phonegap/Cordova plugin which launches native route navigation apps for Android, iOS and Windows
369 stars 131 forks source link

Specified app is not opening #138

Closed dannygl91 closed 7 years ago

dannygl91 commented 7 years ago

Hi I'm using this code in Ionic, but I always get the "USER_SELECT". I can't change the title either if i use "appSelectionDialogHeader" in the options, Ionic info attached.

    let options: LaunchNavigatorOptions = {
      app: this.launchnavigator.APP.GOOGLE_MAPS,
      enableDebug:true
    };
    this.launchnavigator.navigate(this.latitud+","+this.longitu, options)
      .then(
        success => alert('Launched navigator'),
        error => alert('Error launching navigator: ' + error)
    );

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : android 6.2.3
Ionic Framework                 : ionic-angular 3.2.0

System:

Node       : v6.10.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 4.6.1
dpa99c commented 7 years ago

TL;DR: It's not an issue with this plugin per-se, more that Ionic Native is lagging behind it.

The latest major version of this plugin (v4) makes unavoidable backwardly-incompatible changes to the plugin API in order to add new functionality.

You're referencing the plugin via the Ionic Native wrapper which still uses the v3 API and hence needs updating (see ionic-native#1738).

So you can either explicitly install v3 of the plugin (ionic plugin add uk.co.workingedge.phonegap.plugin.launchnavigator@3), or if you have time/are feeling brave, can implement the required changes to the Ionic Native wrapper.

dannygl91 commented 7 years ago

Thanks @dpa99c whit the version 3 works perfectly, I belive I'm brave enough so I will take the time to see in Ionic 4 :D