What permission do i have to add?
On Apr 15, 11:21 am, patrick <[email protected]> wrote:
> Did you add the permission in the manifest?
>
> On Apr 15, 5:06 pm, havexz <[email protected]> wrote:
>
> > I am trying this code but its not working ....
>
> > Intent shortcutIntent = new Intent
> > (Intent.ACTION_MAIN);
> > shortcutIntent.setClassName(this, this.getClass
> > ().getName());
>
> > Intent intent = new Intent();
> > intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT,
> > shortcutIntent);
> > intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "hello");
> > Parcelable iconResource =
> > Intent.ShortcutIconResource.fromContext(
> > NoteView.this, R.drawable.short_icon);
> > intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
> > iconResource);
>
> > intent.setAction(Intent.ACTION_CREATE_SHORTCUT);
> > getApplicationContext().sendBroadcast(intent);
>
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---