Contents

Views 2157 Comment 0
Atachment
Attachment '1'
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print
?

Shortcut

PrevPrev Article

NextNext Article

Larger Font Smaller Font Up Down Go comment Print

android.jpg



# 내가 썼던 방법

if (android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.KITKAT) {
    Intent intent = new Intent();
    intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
    intent.addCategory(Intent.CATEGORY_DEFAULT);
    //intent.setData(Uri.parse("package:" + getPackageName()));
    intent.putExtra("app_package", getPackageName());
    intent.putExtra("app_uid", getApplicationInfo().uid);
    intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
    startActivity(intent);
}else{
    String packageName = "com.ncsoft.nccomix";
    String SCHEME = "package";
    String APP_PKG_NAME_21 = "com.android.settings.ApplicationPkgName";
    String APP_PKG_NAME_22 = "pkg";
    String APP_DETAILS_PACKAGE_NAME = "com.android.settings";
    String APP_DETAILS_CLASS_NAME = "com.android.settings.InstalledAppDetails";
    Intent intent = new Intent();
    final int apiLevel = Build.VERSION.SDK_INT;
    if (apiLevel >= 9) { // above 2.3
        intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
        Uri uri = Uri.fromParts(SCHEME, packageName, null);
        intent.setData(uri);
    } else { // below 2.3
        final String appPkgName = (apiLevel == 8 ? APP_PKG_NAME_22 : APP_PKG_NAME_21);
        intent.setAction(Intent.ACTION_VIEW);
        intent.setClassName(APP_DETAILS_PACKAGE_NAME,
APP_DETAILS_CLASS_NAME);
        intent.putExtra(appPkgName, packageName);
    }
    startActivity(intent);
}


# 참고할 방법 (해보지는 않음 ㅋㅋ)

packageName = "your.package.name.here"

try {
    //Open the specific App Info page:
    Intent intent = new Intent(android.provider.Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
    intent.setData(Uri.parse("package:" + packageName));
    startActivity(intent);

} catch ( ActivityNotFoundException e ) {
    //e.printStackTrace();

    //Open the generic Apps page:
    Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_APPLICATIONS_SETTINGS);
    startActivity(intent);

}


[참고] http://www.makeuseof.com/tag/stop-annoying-notifications-android/

[참고] http://stackoverflow.com/questions/4421527/how-can-i-start-android-application-info-screen-programmatically


?

List of Articles
No. Category Subject Author Date Views
1089 Develop [android] N-Puzzle 게임 file hooni 2015.07.09 863
1088 Develop XE Core 1.8.18 본문 작성시 태그(html) 사라지는 버그 file hooni 2016.04.21 864
1087 Develop [ios] iOS 앱 아이콘을 만드는 유틸 file hooni 2015.01.03 867
1086 Develop [git] 쉬운 버전관리 Git 설명 hooni 2015.08.18 870
1085 Develop [ios] ViewController Push할 때 애니메이션 효과 hooni 2015.10.23 870
1084 PPT [ppt] Information Security 발표 자료 (@Team Study 2012.11.15) file hooni 2015.07.22 876
1083 System/OS [mac] OS X 엘 캐피탄에서 Soudflower 사용하기 2 file hooni 2016.10.03 878
1082 Develop [c] RSA 암호화 구현(gmp 라이브러리 활용) file hooni 2016.10.03 880
1081 System/OS [mac] How to uninstall MySQL on Mac OS. hooni 2017.11.08 884
1080 Develop [js] AngularJS 란? file hooni 2015.11.26 885
1079 Develop [ios] APNS에 사용할 인증서 만들기 (KeyChain에 있는 인증서 Export) file hooni 2015.01.03 889
1078 Develop [ios] UIWebView에서 로컬에 있는 html 파일 불러오기 hooni 2015.02.10 889
Board Pagination Prev 1 ... 3 4 5 6 7 8 9 10 11 12 ... 98 Next
/ 98