When i use PackageManager.setComponentEnabledSetting method to enable
a service like this
: PackageManager pm = getPackageManager();
ComponentName cc = new
ComponentName(getApplicationContext
(),ServiceTest.class);
pm.setComponentEnabledSetting(cc,
PackageManager.COMPONENT_ENABLED_STATE_DEFAULT,
PackageManager.DONT_KILL_APP);
but the exception is java.lang.SecurityException: Permission Denial:
attempt to change component state from pid=258, uid=10020, package
uid=10018
i set the permission in Androidmanifest.xml :
<permission
android:name="android.permission.CHANGE_COMPONENT_ENABLED_STATE"></
permission>
why still has exception?? i wanna know which permissiom i need in
Androidmanifest.xml
THX.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---