android 跳去设置界面,Android跳转到设置界面的方法

  • Post author:
  • Post category:其他


在最新的Android SDK 2.3(API Level 9)中,提供了这样的接口。在文档路径

docs/reference/android/provider/Settings.html#ACTION_APPLICATION_DETAILS_SETTINGS下,有这样的描述:

public static final String ACTION_APPLICATION_DETAILS_SETTINGS Since: API Level 9

Activity Action: Show screen of details about a particular application.

In some cases, a matching Activity may not exist, so ensure you safeguard against this.

Input: The Intent’s data URI specifies the application package name to be shown, with the “package” scheme. That is “package:com.my.app”.

Output: Nothing.

Constant Value: “android.settings.APPLICATION_DETAILS_SETTINGS”

就是说,我们只要以android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS作为Action;“package:应用程序的包名”作为URI,就可以用startActivity启动应用程序信息界面了。代码如下:

Intent intent = new Intent(Settings.ACTION_APPLICATION_DETAILS_SE