Use <data android:scheme="package" />

On Fri, Jul 3, 2009 at 3:19 PM, iPaul Pro <[email protected]> wrote:

>
> Is this even possible?
>
> I have apps that deal with alarms and notifications, both of which are
> canceled/removed when on updates the app. To combat this, I currently
> have my reboot receiver firing at every main-activity onCreate().
> Suffice to say, this is undesirable.
>
> I'd like to implement a receiver that listens for an application
> update.
>
> Any suggestions on how to do this, or accomplish my goal otherwise?
>
> Paul Burke
> [email protected]
> pub:"iPaul Pro"
> ---------------------------------
> Try "CallBack" and "StatusNotes" on the Android Market.
>
> On Jul 1, 12:46 pm, iPaul Pro <[email protected]> wrote:
> > Hi,
> >
> > I'd like to add a Broadcast Action to my Intent Filter that listens
> > for when my application is successfully updated (replaced).
> >
> > android.intent.action.PACKAGE_REPLACED is described as "Broadcast
> > Action: A new version of an application package has been installed,
> > replacing an existing version that was previously installed. The data
> > contains the name of the package." *
> >
> > A Google search for "PACKAGE_REPLACED" leads only to the reference
> > page.
> >
> > Anyone know how would I go about this?
> >
> > <receiver android:name=".UpdateReceiver">
> >         <intent-filter>
> >                 <action
> > android:name="android.intent.action.PACKAGE_REPLACED" />
> >                 <data android:?="com.mypackage.name" />
> >         </intent-filter>
> > </receiver>
> >
> > I'm not sure what data specification or path I should be using, or if
> > this is correct at all.
> >
> > Any help is greatly appreciated!
> >
> > * source =
> http://developer.android.com/reference/android/content/Intent.html#AC...
> >
> > Thanks in advance,
> > Paul
> >
>


-- 
Dianne Hackborn
Android framework engineer
[email protected]

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 [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
-~----------~----~----~----~------~----~------~--~---

Reply via email to