ACTION_PACKAGE_INSTALL is probably not an ordered broadcast, and so it
cannot be aborted, and priorities do not matter.

On Tue, Jul 5, 2011 at 8:17 AM, Nemo Chen <[email protected]> wrote:
> Hi
>
> This  is an useful and interesting action. From the definition below,
> I know that this action would triggered when a package is being
> installed.
> /*
>  *   public static final String ACTION_PACKAGE_INSTALL
>  *   Broadcast Action: Trigger the download and eventual installation
> of a package.
>  */
>
> So  I tried to write my own broadcast receiver which i defined
> statically in manifest file. And to watch the test result obviously,
> the receiver will abort (use function abortBroadcast()), as long as it
> receives the broadcast.
>
> <receiver android:name=".PackageInstallReceiver">
>        <intent-filter android:priority="1000">
>                <action
> android:name="android.intent.action.PACKAGE_INSTALL"></action>
>                <data android:scheme="package"></data>
>        </intent-filter>
> </receiver>
>
> And i tried to dill with this broadcast before the system receiver ,
> so I set the receivers priority "1000" which is the highest priority.
> But when testing this receiver, it didn't work as i wished to abort
> once receiving the broadcast.
>
> So  any one can explain the situation?  And how should I modify my
> program to get that purpose?
>
> --
> 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
>



-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.6 Available!

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