Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JAVA CODE:
- ==========
- PackageManager pm = getPackageManager();
- ComponentName compName = new ComponentName(getApplicationContext(), Widget.class);
- pm.setComponentEnabledSetting(compName, PackageManager.COMPONENT_ENABLED_STATE_ENABLED,PackageManager.DONT_KILL_APP);
- ------------------------------------------------------------------------------------------------------------------------
- ANDROID MAIFESTT:
- =================
- <receiver
- android:name=".Widget"
- android:installLocation="internalOnly"
- android:enabled="false"
- android:label="Premium" >
- <intent-filter>
- <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
- </intent-filter>
- <meta-data
- android:name="android.appwidget.provider"
- android:resource="@xml/premium_widget" />
- </receiver>
- <activity android:name=".Configuration" >
- <intent-filter>
- <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
- </intent-filter>
- </activity>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement