Daniel, sorry to be a pain in the bum, but there are still 2 things I
cannot figure out.

First I am not sure what you mean by DTO, but from what I understand
it is basicaly a place holder for the data in my non-serilizable
class.
I understand how to transfer dta (the one I care about) between
LocationDTO and Location.

Then, how am I stopping the default process to try to serialize the
Location parent object. At thye moment I am doing nothing, this is all
happening by default.

If you would have a link on some doc or an example that would greato-
smashing-fantastic ;).

JM

On 5 oct, 17:41, Daniel Drozdzewski <daniel.drozdzew...@gmail.com>
wrote:
> On 5 October 2011 16:20, Jean-Michel <jeanmichel.caz...@gmail.com> wrote:
>
> > No, I am serialising to disk.
>
> > Do you think it could work out?
>
> > Any idea how to use Parcelable ?
>
> > Many thanks,
> > Jean-Michel
>
> Jean-Michel,
>
> Parcelable is used for inter-process communication and is designed
> specifically for that (i.e. passing the data between services and
> activities).
>
> In order to save it to disk, you have to create mentioned DTO.
>
> It can sound serious, but it is simple:
>
> class LocationDTO implements Serializable {
>
> //all properties extracted from Location that you need
> //... with all getters and setters.
>
> }
>
> When you need to preserve the location, you create this DTO, populate
> all properties yourDTO.setAcuracy(yourLocation.getAcuracy());
>
> ... and preserve this DTO. Then when you need it back in memory, you
> deserialise this DTO, create new Location object and populate its
> properties from DTO.
>
> --
> Daniel Drozdzewski

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to