Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
244 views
in Technique[技术] by (71.8m points)

ios - How to implement a "rate us" feature in a phonegap app

I wish to add some sort of a "Write a Review" or "Rate Us" feature to my app so my customers can easily rate and review my app.

The problem is that the app is implemented using phone gap. Is it possible to implement this feature using html5-phone gap?

Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I use navigator.notification.confirm and have it called when the user reaches a certain point or uses your app so much. Of course you need to add your own links in.

Note this snippet references other parts of my app so customize to meet your needs.

if (settings.core.rate_app_counter === 10) {
    navigator.notification.confirm(
    'If you enjoy using domainsicle, whould you mind taking a moment to rate it? It won't take more than a minute. Thanks for your support!',
    function(button) {
        // yes = 1, no = 2, later = 3
        if (button == '1') {    // Rate Now
            if (device_ios) {
                window.open('itms-apps://itunes.apple.com/us/app/domainsicle-domain-name-search/id511364723?ls=1&mt=8'); // or itms://
            } else if (device_android) {
                window.open('market://details?id=<package_name>');
            } else if (device_bb){
                window.open('http://appworld.blackberry.com/webstore/content/<applicationid>');
            }

            this.core.rate_app = false;
        } else if (button == '2') { // Later
            this.core.rate_app_counter = 0;
        } else if (button == '3') { // No
            this.core.rate_app = false;
        }
    }, 'Rate domainsicle', ['Rate domainsicle', 'Remind me later', 'No Thanks']);
}

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...