setData() does just what it says -- sets only the data field to exactly the
Uri you provide.

On Tue, Feb 17, 2009 at 12:49 AM, [email protected] <[email protected]>wrote:

>
> I reply this thread myself.
>
> # From Intent to URI string - this is OK!
> Intent intent1 = new Intent ();
> String uriString = intent1.toURI ();
> We should call a intent.toURI() function for making Intent to String
> (URI). This is OK!
>
> But You should not call intent.setData () for converting String(URI)
> to Intent. below example is not OK!
> # From URI string to Intent - This is not OK!
> Uri uri = Uri.parse (uriString);
> Intent intent2 = new Intent ();
> intent2.setData (uri)
>
> You should call intent.getIntent () for converting String(URI) to
> Intent. and you don't need to call a Uri.parse method.
> below example is valid.
> Intent intent2 = new Intent ();
> intent2.getIntent (uriString)
>
> but I am curious how to use a Intent.setData (uri) method and what is
> different with a Intent.getIntent() method. even though I have read a
> android documentation, but I don't understand.
> If there is someone who know this issue, please reply!
> >
>


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