In Android, I am trying to call another dummy app from my app via dummy app's uri scheme.
And from the dummy app, when the user click on a button, I want to come back to my app with a return value.
Do you think it's possible?
In Dummy App, I make the configuration as follow:
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:scheme="myapp"
android:host="my-poc-application.com"
android:pathPrefix="/id" />
</intent-filter>
And from my app, I try to re-direct to my dummy app:
String scheme = "myapp"; String host = "my-poc-application.com"; String id = "8"; Uri uri = Uri.parse(scheme + "://" + host + "/" + id); Intent intent = new Intent(Intent.ACTION_VIEW, uri); // Verify it resolves PackageManager packageManager = getPackageManager(); List activities = packageManager.queryIntentActivities(intent, 0); boolean isIntentSafe = activities.size() > 0; // Start an activity if it's safe if (isIntentSafe) { startActivityForResult(intent, 1); }
But the dummy app is not called.