A search for high and low values โโyielded no results for my problem. Therefore, I finally send a complaint for help.
I have two applications, both written by me. Appendix A launches Appendix B by passing parameters through Intent.putExtra (). This works great when starting application B, the parameters are passed beautifully.
However, I cannot find a way to return the response to app A. Using startActivityForResult () always gave me an immediate onActivityResult () with RESULT_CANCELED. Upon further inspection, the logarithm gave me a warning saying: "Activity starts as a new task, therefore canceling the result of the activity."
I tried to make Activity App B with a different launch mode, action filters (android.intent.action.PICK), but didn't change anything.
Am I trying to do the impossible? From what I understand, what I'm trying to do should be like using third-party actions to select photos from the deviceโs photo gallery.
EDIT:
Ok, I tried to remove the LAUNCHER category from Activity B, but it still does not work. Here is my activity:
<activity android:name=".${CLASSNAME}" android:label="@string/app_name" android:configChanges="mcc|mnc|locale|keyboardHidden|orientation" android:launchMode="standard"> <intent-filter> <action android:name="android.intent.action.PICK" /> </intent-filter> </activity>
Has anyone really got this to work? I am starting to suspect that starting another application will never be able to return results, since it seems that it will always start a new task no matter what you put in the "intent filter".
source share