You should use android:authority="your.package.name" On Thu, Jun 24, 2010 at 10:12 AM, Robert Macaulay <[email protected] > wrote:
> On Thu, Jun 24, 2010 at 11:56 AM, mac-systems <[email protected]> wrote: > > Ok, i thought i have to do this. > > Is there any Intent which get broadcasted on update ? Or simlar > > mechanism ? > > You can add a receiver for PACKAGE_REPLACED > <receiver android:name=".OnPackageChangeStarter"> > <intent-filter> > <action > android:name="android.intent.action.PACKAGE_REPLACED" /> > <!-- This doesn't work > <data android:scheme="package" android:path=" > your.package.name" /> > --> > </intent-filter> > </receiver> > > and in the OnPackageChangeStarter, add an if > > if(! intent.getDataString().startsWith("package: > your.package.name")){ > return; > } > > At least on 2.1 Droid, the "intent.getData().getPath()" portion of > the intent is null, so the intent-filter doesn't seem to work. > Including it gets my receiver called for every package change. > The package name is in the "intent.getData().getSchemeSpecificPart()" > > Anyone know if this is a bug? Or is this the right way to accomplish this? > > -- > 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]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- 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

