Yes, please use Intent.toUri() (or a custom marshalling scheme of your own)
for data that goes off the device, or *even* in to persistent storage.
 Parcelable is only for IPC; its representation does not remain stable
across different devices or even platform versions.  (Thus if you use it to
store data in persistent storage, and the user's device gets a platform
upgrade, your stored data may no longer be readable.)

On Sat, Oct 16, 2010 at 3:39 AM, Kostya Vasilyev <[email protected]> wrote:

>  Passing binary data (Parcelables) from one phone to another sounds
> somewhat risky, as one has to consider binary compatibility.
>
> Take a look at Intent.toUri:
>
>
> http://developer.android.com/reference/android/content/Intent.html#toUri(int)
>
> It doesn't support each and every type and combination of extras, but is
> designed to avoid binary compatibility issues.
>
> -- Kostya
>
> 16.10.2010 14:17, Doug пишет:
>
>  On Oct 15, 11:03 pm, MG<[email protected]>  wrote:
>>
>>> Hi. Thank you for your reply.
>>> How would I do this?
>>> Can you help me. Is there any sample program on the internet
>>> that I could use as a reference?
>>>
>> Sorry, you will probably have to be inventive on your own.
>>
>> There are two requirements you have to keep in mind:
>>
>> 1. The devices must be linked somehow via your application.  For
>> example, bluetooth, SMS, wifi local network via socket, or both
>> connected to some network service that will proxy the data between
>> them.
>>
>> 2. An intent is not "just" a set of name/value pairs as someone
>> suggested.  If you want any and every intent to be possible to send,
>> you'll have to look into the Parcelable interface and make sure you
>> parcel and unparcel the intent on both sides UNLESS you can easily
>> flatten your intent as a string.
>>
>> Doug
>>
>>
>
> --
> Kostya Vasilyev -- WiFi Manager + pretty widget --
> http://kmansoft.wordpress.com
>
>
> --
> 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]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
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, and so won't reply to such e-mails.  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