title: Passing data between two android apps using intent
body: <p>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 the game records back to AppA. </p>
  
  <p>So, AppA is launching AppB correctly, but when user is done with playing the game (AppB), AppB crashes while sending the data back to AppA, and this error shows up: </p>
  
  <blockquote>
    <p>Process: com.joy.AppB, PID: 20265
                                                                        android.content.ActivityNotFoundException: Unable to find explicit activity class {com.joy.AppA/com.joy.AppA.views.activities.StartGameActivity}; have you declared this activity in your AndroidManifest.xml?</p>
  </blockquote>
  
  <p><br>
  AppA package name : com.joy.AppA
  <br>Activity class name : com.joy.AppA.views.activities.StartGameActivity</p>
  
  <p>AppB package name : com.joy.AppB
  <br>Activity class name : com.joy.AppB.MainActivity</p>
  
  <p><br>
  Here is what I've done so far:</p>
  
  <p>AppA's StartGameActivity:</p>
  
  <pre><code>//To launch AppB game
  Intent launchGameIntent = getPackageManager().getLaunchIntentForPackage("com.joy.AppB");
  startActivity(launchGameIntent);
  
  //To retrieve game scores from AppB game
  Intent intent = getIntent();
  String[] gameRecords_array = intent.getStringArrayExtra("gameRecord");
  </code></pre>
  
  <p>AppA's AndroidManifest.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.joy.AppA"&gt;
  .
  .
  .
  &lt;activity
          android:name="com.joy.AppA.views.activities.StartGameActivity"
          android:label="Start Game"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.SEND" /&gt;
          &lt;/intent-filter&gt;
          &lt;meta-data
              android:name="android.support.PARENT_ACTIVITY"
              android:value=".views.activities.DashboardActivity" /&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>AppB's MainActivity:</p>
  
  <pre><code>Intent i = new Intent();
  i.setComponent(new ComponentName("com.joy.AppA","com.joy.AppA.views.activities.StartGameActivity"));
  i.setAction(Intent.ACTION_SEND);
  i.putExtra("gameRecord", gameRecord_array);
  startActivity(i);
  </code></pre>
  
  <p>AppB's AndroidManifest.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
  package="com.joy.AppB" &gt;
  
  &lt;supports-screens android:resizeable="true" /&gt;
  
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
  &lt;application
      android:allowBackup="true"
      android:icon="@drawable/app_icon"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme"&gt;
      &lt;activity
          android:name=".MainActivity"
          android:screenOrientation="portrait"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  .
  .
  .
  </code></pre>
  
  <p>Thanks in advance for your help! </p>