I have two applications: A and B.
From A, I run B for the result using the following code:
Intent fmIntent = getPackageManager().getLaunchIntentForPackage("com.example.B");
fmIntent.putExtra("hello", "world");
startActivityForResult(fmIntent, REQUEST_TEST);
From B, I do the following:
getIntent().putExtra("completed", true);
setResult(RESULT_OK, getIntent());
finish();
If I do this for activities in one application, it works as expected.
However, since it has two different applications, I get an empty intent without data and invalid result code. How do I edit the above to ensure that one intention is supported throughout?
source
share