Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

callback(1)- immediate click on rate now does not work #317

Open
selcuk-sahin opened this issue Nov 26, 2021 · 6 comments
Open

callback(1)- immediate click on rate now does not work #317

selcuk-sahin opened this issue Nov 26, 2021 · 6 comments

Comments

@selcuk-sahin
Copy link

In given callback function I expect appRate should open Rate Now after displaying. Nothing happens.
However, I can see that onButtonClicked callback is triggered and logged to console.
Device: iOS 11 - ^11.4

          callbacks: {
            handleNegativeFeedback: function(){
              window.open('mailto:[email protected]', '_system');
            },
            onRateDialogShow: function(callback){
              console.log("onRateDialogShow")
              callback(1) // cause immediate click on 'Rate Now' button
            },
            onButtonClicked: function(buttonIndex){
              console.log("onButtonClicked -> " + buttonIndex);
            }
          },
@rhafiko
Copy link

rhafiko commented Feb 7, 2022

try callback(3) instead.

@krishnadaspalode
Copy link

Hi @rhafiko , @selcuk-sahin , @pushandplay

The callbacks 'onRateDialogShow' and related callback(1) invokes 'onButtonClicked' on invoking AppRate.promptForRating(), however, they are not triggered based on the user selections in native prompt. Do we have any option to get the user button selections/actions

TIA
Krishna

@selcuk-sahin
Copy link
Author

A workaround:
I ended up creating my own soft prompt & trigger the app rate immediately.
I'm using ionic-native wrapper here.
Also using Swal2 for the soft alerts, but you can do it any way you like.

for example:

// show & handle alert
const initialFeedBack = await Swal.fire("Would you like to rate the app?");
if(initialFeedBack.isConfirmed) {
    
    // prompt appRate immediately
    this.appRate.promptForRating(true);
}

@krishnadaspalode
Copy link

@selcuk-sahin

I have such controlled invoke of AppRate plugin, My issue is while invoking. I have to hold on to custom logics in below areas, however, these are not being triggered based on user selections in rate prompt. The 'onRateDialogShow' gets invoked right after popup gets launched along with 'onButtonClicked' function. Do we have any way to understand whether user given a rating or selected not now/cancel etc ?

AppRate.setPreferences({
callbacks: {
handleNegativeFeedback: () => {
//TODO- custom logic
},
onRateDialogShow: (callback) => {
callback(3);
//TODO- custom logic
},
onButtonClicked: (buttonIndex, currentBtn, type) => {
//TODO- custom logic
},
done: () => {
//TODO- custom logic
}
}
});

@selcuk-sahin
Copy link
Author

Do we have any way to understand whether user given a rating or selected not now/cancel etc ?

I don't believe we can, due to privacy reasons & device limitations.
Users share their opinion & rating with their app store & not with us, directly.

@krishnadaspalode
Copy link

Do we have any way to understand whether user given a rating or selected not now/cancel etc ?

I don't believe we can, due to privacy reasons & device limitations. Users share their opinion & rating with their app store & not with us, directly.

Even I too reached the same understandings. Still was checking one more round. Thanks for your time :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants