Empty dialog with Ionic
See original GitHub issueDon’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:
Any ideas?
Thanks!
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:5
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I solve it by disabling the pre-dialog (I didn’t want it anyway). To dothat just set simpleMode to true.
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”?