How to transfer java class between Android Activities

Published by Igor Khrupin on

There are a lot of ways transferring complex data between Android activities. Lets talking about couple of they. I going to talking about ways which used Bundle as data container.

1. FIRST. Pascelable interface

Bundle can contain java class which implemented Parcelable interface. Your class must implement this interface. After that bundle can contains this class.

2. SECOND. Put as JSON string
In some cases I transfer data between activities as JSON string.

This is not finished list of techniques. There are couple of then.


2 Comments

handbag articles · 20 August, 2012 at 18:41

I really enjoy this template youve got going on on your site. What is the name of the theme by the way? I was thinking of using this style for the web site I am going to make for my school project.

bag articles · 21 August, 2012 at 15:01

Fantastic Info! But I???¡§o?¡§¡§m having some trouble trying to load your blog. I have read it numerous times before and in no way gotten a thing like this, but now when I try to load a thing it just takes a bit while (5-10 minutes ) after which just stops. I hope i don???¡§o?¡§¡§t have spyware or a thing. Does anyone know what the difficulty might be?

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.