question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Empty dialog with Ionic

See original GitHub issue

Don’t know why but I follow all the instructions and guides, but I always get an empty dialog with null value buttons.

First, I install the plugin using the following command:

ionic cordova plugin add cordova-plugin-apprate
npm install --save @ionic-native/app-rate

Later, for testing purposes, I add this code after the platform.ready() line:

this.appRate.preferences = {
        displayAppName: 'Test App',
        usesUntilPrompt: 2,
        promptAgainForEachNewVersion: false,
        storeAppURL: {
          ios: '1216856883',
          android: 'market://details?id=com.devdactic.crossingnumbers'
        },
        customLocale: {
          title: 'Do you enjoy %@?',
          message: 'If you enjoy using %@, would you mind taking a moment to rate it? Thanks so much!',
          cancelButtonLabel: 'No, Thanks',
          laterButtonLabel: 'Remind Me Later',
          rateButtonLabel: 'Rate It Now'
        },
        callbacks: {
          onRateDialogShow: function(callback){
            console.log('rate dialog shown!');
          },
          onButtonClicked: function(buttonIndex){
            console.log('Selected index: -> ' + buttonIndex);
          }
        }
      };
 
      // Opens the rating immediately no matter what preferences you set
      this.appRate.promptForRating(true);

But all I get in my app is this:

screenshot_20180701-122644

Any ideas?

Thanks!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:5
  • Comments:5

github_iconTop GitHub Comments

20reactions
devmartinez0commented, Jul 7, 2018

I solve it by disabling the pre-dialog (I didn’t want it anyway). To dothat just set simpleMode to true.

3reactions
andelzcommented, Jul 2, 2018

Same for me. Looks like at least the current Android Version (8) has kind of a “Pre-Dialog” that says: “Do you like using XYZ?” [YES!] [NOT REALLY]. If you hit yes you’ll get the actual dialog. Problem here is that there seem to be no proper translations. If I set useLanguage property on preferences to ‘en’, I get the message mentioned above. Switching to ‘de’ I get an empty dialog with 2 NULL buttons (left one is yes by the way, so if you hit the left NULL, you’ll get your dialog).

Is there a way to setup those translations as well, or at least get rid of the “Pre-Dialog”?

Read more comments on GitHub >

github_iconTop Results From Across the Web

ion-modal: Ionic Mobile App Custom Modal API Component
ion -modal is a dialog that appears on top of mobile app content, and must be dismissed before interaction resumes. Learn more about...
Read more >
Dialogs - Supported Plugins
The Dialogs plugin provides access to customize the native device dialogs. ... Returns: Promise < any > Returns a blank promise once the...
Read more >
What is the purpose of a role when dismissing an Ionic ...
I'm creating an ion-modal dialog, and the close button calls this.modalCtrl.dismiss(my_data, 'close');. I added the 'close' string as a role ...
Read more >
Angular Dynamic Components: Building a Dialog System
To get started, let's create an empty dialog component. This component will consist of a white dialog area, while the rest of the...
Read more >
Ionic 5 - 22 Ion-alert (in detail) - YouTube
The dialog that presents users with information or collects information from the user using inputs. An alert appears on top of the app's ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found