Android
De WikiDeveloppez.
(Différences entre les versions)
(→Documentation on officiel des drawables xml) |
(→Documentation non officiel des drawables xml) |
||
==Documentation non officiel des drawables xml == | ==Documentation non officiel des drawables xml == | ||
http://idunnolol.com/android/drawables.html | http://idunnolol.com/android/drawables.html | ||
+ | |||
+ | == Activer/Desactiver des components == | ||
+ | http://developer.android.com/reference/android/content/pm/PackageManager.html#setComponentEnabledSetting(android.content.ComponentName,%20int,%20int) | ||
+ | |||
+ | desactiver un receiver | ||
+ | <pre> | ||
+ | PackageManager pm = getPackageManager (); | ||
+ | pm.setComponentEnabledSetting | ||
+ | ( | ||
+ | new ComponentName(this, monReceiver.class), | ||
+ | PackageManager.COMPONENT_ENABLED_STATE_DISABLED, | ||
+ | PackageManager.DONT_KILL_APP | ||
+ | ); | ||
+ | </pre> | ||
+ | |||
+ | activer un receiver | ||
+ | <pre> | ||
+ | PackageManager pm = getPackageManager (); | ||
+ | pm.setComponentEnabledSetting | ||
+ | ( | ||
+ | new ComponentName(this, monReceiver.class), | ||
+ | PackageManager.COMPONENT_ENABLED_STATE_ENABLED, | ||
+ | PackageManager.DONT_KILL_APP | ||
+ | ); | ||
+ | </pre> |