Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Android™ Development

Reply
New Contributor
Posts: 2
Registered: ‎08-15-2012
My Device: Simulator
My Carrier: None

ACTION_DELETE compatibility

Hi all,

 

I have an issue with calling activity for ACTION_DELETE intent. On simulator I get exception like:

java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.DELETE dat=package:<pkg2delete> flg=0x10000000 cmp=com.android.packageinstaller/.UninstallerActivity } from ... requires android.permission.DELETE_PACKAGES. I don't get why this permission is needed. Is this behaviour normal for android runtime or this is just a bug and it needs to be fixed?

 

Thanks!

Developer
Posts: 216
Registered: ‎08-23-2012
My Device: Javelin 8900
My Carrier: Axis

Re: ACTION_DELETE compatibility

I think this is not bug from your application, I guess there is something wrong in your code
New Contributor
Posts: 2
Registered: ‎08-15-2012
My Device: Simulator
My Carrier: None

Re: ACTION_DELETE compatibility

I think the code is fine because other apps from market have the same problem too. Actual code (works on real android):

Intent intent = new Intent(Intent.ACTION_DELETE, uri);

intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);

startActivity(intent);