You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import"./App.css";importReact,{useState}from"react";importAppRatefrom"cordova-plugin-apprate";functionApp(){console.log(`App starting...`);consthandleClick=()=>{console.log(`handleClick`);constref=window.open("http://www.google.com","_self");console.log(`opened window`);};constrateClick=()=>{console.log(`rateClick`);AppRate.setPreferences({storeAppUrl: {ios: "blah.blah.blah",android: "market://details?id=blah.blah.blah",},reviewType: {ios: "AppStoreReview",android: "inAppBrowser",},simpleMode: true,showPromptForInAppReview: false,customLocale: {title: "My Title",message: "My Message",rateButtonLabel: "Rate It Now...",cancelButtonLabel: "No, Thanks...",laterButtonLabel: "Remind Me Later...",},callbacks: {onButtonClicked: function(buttonIndex){console.log(`Button Clicked ${buttonIndex}`);switch(buttonIndex){case1:
console.log(`B1`);break;case2:
console.log(`B2`);break;case3:
console.log(`B3`);break;}},},openUrl: function(url){console.log(`openUrl to ${url}`);letsafariAvailable=false;if(window.SafariViewController){window.SafariViewController.isAvailable(function(available){safariAvailable=available;});}if(!safariAvailable){console.log(`no safari, must be a droid...`);window.open(url,"_blank","location=yes");}else{window.SafariViewController.show({url: url,barColor: "#0000ff",// on iOS 10+ you can change the background color as wellcontrolTintColor: "#00ffff",// on iOS 10+ you can override the default tintColortintColor: "#00ffff",// should be set to same value as controlTintColor and will be a fallback on older ios},// this success handler will be invoked for the lifecycle events 'opened', 'loaded' and 'closed'function(result){},function(msg){});}},});AppRate.promptForRating();};return(<divclassName="App"><headerclassName="App-header"><p>Hello from React App</p><buttononClick={handleClick}>Open Google</button><buttononClick={rateClick}>Rate Me</button></header></div>);}exportdefaultApp;
When the Rate Me button is clicked, the expected behavior occurs, i.e. the following options are displayed:
However, when I select the 'Rate It Now...' button I get:
Which is not the expected behavior. From everything I have read about this, I should see the in-app rating.
Also the log messages do show that openUrl is called with null as the argument and that button 3 was clicked. I assume button 3 is the rate button but that the null value for the url is incorrect.
I did try changing the reviewType.android value from "InAppBrowser" to "InAppReview" but the behavior was the same. I have the following plugins installed:
cordova-plugin-apprate
cordova-plugin-dialogs
cordova-plugin-inappbrowser
cordova-plugin-nativestorage
cordova-plugin-whitelist
The text was updated successfully, but these errors were encountered:
I have the following react/cordova app:
When the Rate Me button is clicked, the expected behavior occurs, i.e. the following options are displayed:
![Screen Shot 2021-04-29 at 4 31 42 PM](https://user-images.githubusercontent.com/42189316/116616125-4659f600-a90a-11eb-9f88-8b09305f903a.png)
![Screen Shot 2021-04-29 at 4 31 59 PM](https://user-images.githubusercontent.com/42189316/116616224-70abb380-a90a-11eb-8586-e921db43abf2.png)
However, when I select the 'Rate It Now...' button I get:
Which is not the expected behavior. From everything I have read about this, I should see the in-app rating.
Also the log messages do show that openUrl is called with null as the argument and that button 3 was clicked. I assume button 3 is the rate button but that the null value for the url is incorrect.
I did try changing the reviewType.android value from "InAppBrowser" to "InAppReview" but the behavior was the same. I have the following plugins installed:
cordova-plugin-apprate
cordova-plugin-dialogs
cordova-plugin-inappbrowser
cordova-plugin-nativestorage
cordova-plugin-whitelist
The text was updated successfully, but these errors were encountered: