Forum Discussion
anhvu
10 years agoFrequent Contributor
Here is my script
function openAppwithADBShell(device,package,activity)
{
var status = true;
var msg = "";
//Check Device
if(Mobile["Device"](device)["Exists"])
{
Mobile["Device"](device)["ShellExecute"]("adb shell am start "+ package +"/"+ activity);
//Delay
Delay(10000)
}
else
{
status = false;
msg = Log["Error"]("openAppwithADBShell: "+"Failed!"+"The device: "+device+" is not existed!")
}
return(new Array("openAppwithADBShell",status,msg));
}
You should download the System Android Information app to know what is the package and activity of your app.
For example:
//Package: com.apple.android.music
//Activity: com.apple.android.music.onboarding.activities.SplashActivity
The activity is the one contain the MAIN function.
Related Content
- 2 years ago
- 2 years ago
- 4 years ago
Recent Discussions
- 4 days ago
- 4 days ago
- 7 days ago