android - Receive a broadcast AFTER user click on OK button AFTER uninstall was completed -


i placed receiver tags in androidmanifest.xml:

<receiver android:name="my.package.mybroadcastreceiver" >     <intent-filter>         <category android:name="android.intent.category.default" />          <action android:name="android.intent.action.package_removed" />          <data android:scheme="package" />     </intent-filter> </receiver> 

and implemented broadcastreceiver subclass:

public class mybroadcastreceiver extends broadcastreceiver {      @override     public void onreceive( final context context, final intent intent ) {         log.w( "received!!!!!!!" );     } } 

this works fine!!! but... onreceive method called after uninstall completed before users press ok @ confirmation activity showed native system.

i wanna, if exists, receive broadcast after user press ok.

thanks!

i made workaround , works far.

the activity calling uninstall intent flagged that:

<activity     android:name="my.package.myactivity"     android:label="@string/app_name"     android:launchmode="singletask"     android:nohistory="true"     android:screenorientation="portrait" > 

the flag android:nohistory="true" removes activity history after stopped new activity after user click on "ok" button in confirmation view after uninstall completed, user goes home screen view.

i removed flag placed code executed after uninstall completed , confirmed user on onrestart method in myactivity.

it's workaround, if has way user confirmation after complete uninstall don't know!


Comments

Popular posts from this blog

Admob integration with pygame in android -

mod rewrite - Using "?" when rewriting the URL -

installer - what is Hex representation of MSIUSEREALADMINDETECTION? -