just_user
just_user

Reputation: 12059

sending an intent with extras to another app of mine and send back a response

If I have two apps, A and B. App A is the main app and should be able to send a request to B which should send some info back.

I can't figure out the need intents to do this and haven't been able to find examples or tutorials that shows how to do this with two apps of mine.

Any suggestions?

Upvotes: 0

Views: 379

Answers (1)

Ted Hopp
Ted Hopp

Reputation: 234795

You need to declare an activity, service, or broadcast receiver in app B that can receive an intent. Declare the intent filter in B's manifest. Then A can use the intent with startActivityForResult() to request the info; it will (asynchronously) receive the info in onActivityResult(). This is discussed in the guide topic Intents and Intent Filters. The Notepad sample application shows how to use this technique.

Upvotes: 1

Related Questions