如何实施“评价我们"phonegap 应用程序中的功能 [英] How to implement a "rate us" feature in a phonegap app

查看:18
本文介绍了如何实施“评价我们"phonegap 应用程序中的功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望在我的应用中添加某种撰写评论"或评价我们"的功能,以便我的客户可以轻松地评价和评价我的应用.

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.

问题是该应用程序是使用电话间隙实现的.是否可以使用 html5-phone gap 实现此功能?

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

谢谢!

推荐答案

我使用 navigator.notification.confirm 并在用户到达某个点或使用您的应用程序太多时调用它.当然需要自己加链接.

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']);
}

这篇关于如何实施“评价我们"phonegap 应用程序中的功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆