Sunday, June 17, 2012

Android- Link to Google Store for Ranking


User reviews of Android Apps and rankings are the key metric by which Android apps are measured. I've added buttons to many of my apps to make it easy for users to create a review for my app from the app.  All you need is the url to the app and the code below.

// the package name as registered in the manifest.
public static final String URL_LINK_DEST = "http://market.android.com/search?q=pname:com.yourapp.appname.android";


 Button btnRate= (Button) findViewById(R.id.btnRateThisApp);
       btnRate.setVisibility(View.VISIBLE);
       btnRate.setClickable(false);
       btnRate.setOnClickListener(new View.OnClickListener(){

public void onClick(View v) {
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse(GlobalConstants.URL_LINK_DEST));
    startActivity(i);  
}

});

No comments:

Post a Comment