FWIW, Intent.toURI() is what Home uses to store shortcuts. All
shortcuts on your Home screen are just intents stored in a sqlite
database.

On Mon, Sep 14, 2009 at 10:55 AM, Pedro Fernandes <[email protected]> wrote:
>
> >
>
>
> >
>
>
> Roger L wrote:
>> Well, this is what i am doing
>>
>> Calling ACTION_PICK_ACTIVITY for result, i get back
>>
>> Intent { action=android.intent.action.MAIN categories=
>> {android.intent.category.LAUNCHER} comp={com.android.alarmclock/
>> com.android.alarmclock.AlarmClock} }
>
> Most likely, you are getting back an Intent object which dumps the above
> as the result of a call to toString().
>
>> do I have to somehow parse this and save the info, and then
>> add .addActivity, .addCategory, and .setClassName?
>
> Parse?
>
> Use getter methods on the Intent object.
>
> In this case, you want getAction(), getCategories(), and getComponent().
> The last one will return a ComponentName(), which in turn has
> getClassName() and getPackageName() getter methods. Persist all four of
> those values. Then, when you need the Intent back, use setClassName(),
> setAction(), and addCategory() to rebuild it from the pieces.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.0 In Print!
>
> --~--~---------~--~----~------------~-------~--~----~
> 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
> -~----------~----~----~----~------~----~------~--~---
>
>
>



-- 
Romain Guy
Android framework engineer
[email protected]

Note: please don't send private questions to me, as I don't have time
to provide private support.  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