Please register for only your specific package name, not every package, so
your app doesn't get launched every time another app is installed or
uninstalled.

On Wed, Nov 18, 2009 at 12:21 PM, sdphil <phil.pellouch...@gmail.com> wrote:

> oh, okay, so I added this line to my manifest --
>
>    <data android:scheme="package"/>
>
> and it seemed to work.  I get a removed followed by a replaced.  as is
> documented here:
>
> http://developer.android.com/intl/fr/guide/appendix/faq/framework.html
>
> now I just gotta figure out how to remove/replace the app widget when
> i get this...  anyone??
>
> On Nov 18, 12:13 pm, sdphil <phil.pellouch...@gmail.com> wrote:
> > 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 android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com<android-developers%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to