I know that you can start any exported activity from any app via adb
using the following command:
am start -n com.myapp.test/.TestActivity
Using the "am start"
command it is also possible to send extra data to the activity (I know how to do this, this is not the question I am asking here!).
However what I need to know is if it is also possible to receive the response data sent back from the started activity when it finishes?
UPDATE
You could print results to logcat.
Just start with -W
, so it waits for launch to complete
and then do a logcat -d
OP already has understanding for the following. I misread the question, keeping it just in case for somebody else who lands here
To send data to the activity
Please refer here for the intent specification.
You can pass in key value pairs.
To Quote from spec-e|--es <EXTRA_KEY> <EXTRA_STRING_VALUE>
can be used to pass key string-value pair.
There are other options to pass in different type of data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With