---
title: "跳转至Google Play,rate,more推广功能"
author: "sunlips"
date: "2014-08-19T15:09:12Z"
tags: []
categories: ["移动开发"]
slug: "google-play-rate-more"
draft: false
lastmod: "2014-08-19T15:09:12Z"
id: 2105953
url: "https://free0coding.iteye.com/blog/2105953"
---

```
String appPackageName = getPackageName(); 
// getPackageName() from Context or Activity object
try {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=" + appPackageName)));
} catch (android.content.ActivityNotFoundException anfe) {
    startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://play.google.com/store/apps/details?id=" + appPackageName)));
}
```