Android: Pass complex data structures through activities or services
<p>Hi I want to pass  complex data structures from my Service class to Activity class.</p>

<p>I create class Serializable :</p>

<pre><code>        class SaveMe implements Serializable {

        private static final long serialVersionUID = 1L;

        static final int test = 1234;

        private int user;

        private String name;

        private double score;


        public SaveMe() {}
    }
</code></pre>

<p>And I put it in Bundle </p>

<pre><code>Bundle bundle = new Bundle();
bundle.putSerializable("serializable", new SaveMe());
</code></pre>

<p>HOW can I send this information to Activity class ?</p>

<p>I try with this code :</p>

<pre><code>Intent mapIntent = new Intent(INTENT_MAP);     
mapIntent.putExtras(bundle);
</code></pre>

<p>And than I want to send to BroadcastReciver using:</p>

<pre><code> sendBroadcast(mapIntent);
</code></pre>

<p>But I receive force error!</p>

<p>Should I use BroadcastReceiver to pass this data structure to my activity?</p>

<p>How to send to another activity?</p>

<p>Thanks</p>
