Created
May 4, 2017 03:39
-
-
Save QB/bc721b7164f5e5c798afdfeb81a4a594 to your computer and use it in GitHub Desktop.
Androidアプリのパーミッションをいじる設定画面に飛ばすプヨグヤム
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.hoge.hogehoge; | |
import android.content.ComponentName; | |
import android.content.Intent; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
public class MainActivity extends AppCompatActivity { | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
Intent intent = new Intent(); | |
intent.setComponent(new ComponentName("com.android.settings", "com.android.settings.Settings")); | |
intent.putExtra(":android:show_fragment", "com.android.settings.applications.AppOpsSummary"); | |
startActivity(intent); | |
finish(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment