Android Open Source - RateMyApp Open Play Store Action

From Project

Back to project page RateMyApp.


The source code is released under:

MIT License

If you think the Android project RateMyApp listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.mariosangiorgio.ratemyapp.actions;
//from  www  . j a  v  a 2s. c  o m
import android.content.Context;
import android.content.Intent;

import com.mariosangiorgio.ratemyapp.PreferencesManager;

public class OpenPlayStoreAction implements Action{
    private final PreferencesManager preferencesManager;

    public OpenPlayStoreAction(PreferencesManager preferencesManager){
        if(preferencesManager == null){
            throw new IllegalArgumentException();
        this.preferencesManager = preferencesManager;

    public void execute(Context context, FragmentManager fragmentManager) {
        try {
            context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + context.getPackageName())));
        } catch (android.content.ActivityNotFoundException e) {
            context.startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("" + context.getPackageName())));

Java Source Code List