when I re-install an application, i get PACKAGE_REMOVED followed by
PACKAGE_ADDED.
I never see PACKAGE_REPLACED. any ideas why? And actually, I never
see any of the PACKAGE_* actions except in LogCast -- I cannot get my
broadcast receiver to get the events.
i'm doing this in the emulator using adb --
adb install -r MyApp.apk
My Android manifest has these lines in it:
<application...>
...
...
<receiver android:name="com.test.MyApp.UpdateReceiver">
<intent-filter>
<action
android:name="android.intent.action.PACKAGE_ADDED"/>
<action
android:name="android.intent.action.PACKAGE_REMOVED"/>
<action
android:name="android.intent.action.PACKAGE_REPLACED"/>
</intent-filter>
</receiver>
...
...
</application>
And my UpdateReceiver.java looks like this:
package com.test.MyApp;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
public class UpdateReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
System.err.println("action: " + action);
}
}
tia.
--
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