====================
启动APK
====================
os.execute("am start -n {包(package)名} / {包名}.{活动(activity)名称}")
os.execute("am start -n org.cocos2dx.tests/org.cocos2dx.tests.TestsDemo")
====================
关闭APK
====================
比如关闭浏览器进程:os.execute("killall com.android.browser")
启动APK
====================
os.execute("am start -n {包(package)名} / {包名}.{活动(activity)名称}")
包名package和活动activity名称可以反编译apk后,在每个apk的AndroidManifest.xml里面查看。
例如:
os.execute("am start -n com.android.calculator2/com.android.calculator2.Calculator")
os.execute("am start -n org.cocos2dx.tests/org.cocos2dx.tests.TestsDemo")
====================
关闭APK
====================
os.execute("killall {包名}")或者os.execute("busybox killall {包名}")
比如关闭浏览器进程:os.execute("killall com.android.browser")