You need to implement logic for receive data from external app, following is the simple example for handle that,
In your manifest, you need to define internet filter in which activity you want to handle a data like following way,
<activity
android:name=".view.ActivityHandleShare"
android:theme="@style/Theme.AppCompat.Light.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain" />
</intent-filter>
</activity>
And after that, you can handle data in activity like following,
private void handleSharingData() {
// Get intent, action and MIME type
Intent intent = getIntent();
String action = intent.getAction();
String type = intent.getType();
if (Intent.ACTION_SEND.equals(action) && type != null) {
if ("text/plain".equals(type)) {
handleSendText(intent); // Handle text being sent
}
}
}
Now finally when you share data with your given format you will able to open your application when share using intent(Note: I have explained example only for text/plain for image or multiple image you can take help from following url https://developer.android.com/training/sharing/receive.html)