Hi together.

I have an application A and a application B that both have an activity. Now
i want to send Data from activity A1 to activity B1 and back. Whats the
easiest way to to dis?

I tried to use Remote Service via AIDL, but this doesn't work very well in
both directions because I only can pass the primitives data types and not
every object i like (ok i would have to implement parceable but this is not
really practicle). Then i read this post by Dianne Hackborn:

If you are communicating via a Service, you can use Messenger as the
> interface returned by onBind(), and you can stuff fairly arbitrary data in
> the Message with message.setData().
>

 Now im wondering how this should work. If in the Service implementaiton i
change the return type to Messenger instead of IBinder im not overriding
anymore the onbind method of Service. so how to do that??

Then i also tried to use intents. I start my second activity (b1) the
following way:

Intent intent = new Intent("b.intent.action.Launch");
> intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
> startActivity(intent);
>

Every time i tried to send a message i sent an Intent to this activity by
the following code:

Intent intent = new Intent("b.intent.action.Launch");
> intent.addFlags(Intent.FLAG_ACTIVITY_SINGLE_TOP);
> intent.putExtra("test", "testmsg");
>

To receive the intent i overwrote the onNewIntent() method in the receving
activity (b1). But nevertheless, the code there is never executed.

So what can i do to solve this problem? Any help is really appreciated.
Thanks!

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