In my app I wrote mechanism which lets return to the activity whet the application is suddenly removed from the device memory. Sometimes it happens eg. when the phone rings and there is not enough memory for phone application and my app. After the phone app ends the system call quite new process for my app and opens this activity which was closed previously.
I hope the mechanism I wrote works fine but I don't know how to test it. I work in android studio.
So the question is how to simulate the process of killing and removal the application from system, and calling back my app process and activity.
fire this by cmd
echo 'am broadcast -a com.android.vending.INSTALL_REFERRER -n "package name/path of reciver" --es "referrer" "utm_source=test_source&utm_medium=test_medium&utm_term=test_term&utm_content=test_content&utm_campaign=test_name"; exit' | ./adb shell
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.