android app rate on google play and amazon

http://*.com/questions/11393191/linking-back-to-amazon-app-store-for-ratings

 

    public static void ShowGooglePlayRateDialog(final Context mContext) {
        final Dialog dialog = new Dialog(mContext);
        dialog.setTitle("Rate " + APP_TITLE);
        mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri
                .parse("market://details?id=" + APP_PNAME)));
        dialog.dismiss();
    }
    
    public static void ShowAmazonRateDialog(final Context mContext) {
        final Dialog dialog = new Dialog(mContext);
        dialog.setTitle("Rate " + APP_TITLE);
        mContext.startActivity(new Intent(Intent.ACTION_VIEW, Uri
                .parse("amzn://apps/android?p=" + APP_PNAME)));
        dialog.dismiss();
    }    
    
    public static void ShowRateDialog(final Context mContext){
        String manufacturer= android.os.Build.MANUFACTURER;
        boolean isAmazon = manufacturer.equalsIgnoreCase("Amazon");
        if (isAmazon){
            ShowAmazonRateDialog(mContext);
        } else {
            ShowGooglePlayRateDialog(mContext);
        }
    }

android app rate on google play and amazon,布布扣,bubuko.com

android app rate on google play and amazon

上一篇:IOS-资源最小化之点九图片的使用


下一篇:动态设置android:drawableLeft|Right|Top|Bottom