I have two separate android apps, AppA and AppB. I am trying to get AppA to launch AppB (which is a game app). After the user is done playing the game (AppB), it will send t
Try this:
AppA's AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.joy.AppA">
.
.
.
<activity
android:name="com.joy.AppA.views.activities.StartGameActivity"
android:label="Start Game">
<intent-filter>
<action android:name="com.joy.AppA.views.activities.LAUNCH_IT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".views.activities.DashboardActivity" />
</activity>
Then to send data to app a activity from app b, do this:
Intent i = new Intent();
i.setAction("com.joy.AppA.views.activities.LAUNCH_IT");
i.putExtra("gameRecord", gameRecord_array);
startActivity(i);
Maybe it can be useful:
Content Provider and Content Resolver components.
Content Resolver makes request to Content Provider, and the provider respond. This is similar to a communication between two different applications.
For example a client (Resolver) and a content manager(Provider).
This is an example tutorial: https://www.tutorialspoint.com/android/android_content_providers.htm
Hope it helps!