dpa99c / phonegap-launch-navigator

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

Prompt to remember choice only shows the first time, not the subsequent times. #192

Closed tala9999 closed 6 years ago

tala9999 commented 6 years ago

I'm submitting a ... (check one with "x"):

Bug report

Current behavior: I'm using this launchOptions

        let launchOptions = {
          appSelection: {
            rememberChoice: { enabled: "prompt", prompt: { headerText: "Remember this choice?" } }
          }
        };

        launchNavigator.navigate([lat, lng], launchOptions);

When users select No at the prompt screen, the prompt will not be shown again so in case users change their mind and want to remember the choice, they have to delete the app (or app settings) to see the prompt again.

Expected behavior: The prompt to remember choice should be shown again so users have chance to remember the choice if they want. This is much more convenient for them.

dpa99c commented 6 years ago

If a user answers "No" when asked if they wish their choice to be remembered, it does not make sense for the default behaviour to ask them again every time the choose to navigate - that's just annoying for the user.

However, if you wish to implement that behaviour, you can simply just call launchnavigator.appSelection.userPrompted.clear() every time before calling navigate() which will clears the flag which indicates if the user has already been prompted.

tala9999 commented 6 years ago

Awesome. Thanks for the quick reply.