1111
var url = "www.baidu.com";
var Activity = {
"chrome": "com.android.chrome/com.google.android.apps.chrome.IntentDispatcher",
"360": "com.qihoo.browser/.BrowserActivity",
"QQ": "com.tencent.mtt.x86/.MainActivity",
"海豚": "com.dolphin.browser.xf/mobi.mgeek.TunnyBrowser.MainActivity",
"欧朋": "com.oupeng.browser/com.opera.android.OperaMainActivity",
"傲游": "com.mx.browser/.MxBrowserActivity",
"UC": "com.UCMobile/com.uc.browser.InnerUCMobile"
};
var openurl = shell.execCommand("am start -n " + Activity["chrome"] + " -d " + url);
logd(openurl);
shell.execCommand 执行Shell命令
- 执行Shell命令,会自动区分代理还是root
- @param command 命令,例如安装App : pm install /sdcard/app.apk
- @return 命令执行后返回的字符串结果
function main(){ var result = shell.execCommand("pm install /sdcard/app.apk"); } main();