adb-toolkit
Advanced tools
Comparing version 0.1.1 to 0.2.0
{ | ||
"name": "adb-toolkit", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "ADB toolkit", | ||
@@ -5,0 +5,0 @@ "main": "src/index.js", |
@@ -66,3 +66,4 @@ const shell = require('shelljs'); | ||
package: 'org.mozilla.vrbrowser', | ||
launchCmd: 'adb shell am start -a android.intent.action.VIEW -d "{URL}" org.mozilla.vrbrowser/org.mozilla.vrbrowser.VRBrowserActivity' | ||
//launchCmd: 'adb shell am start -a android.intent.action.VIEW -d "{URL}" org.mozilla.vrbrowser/org.mozilla.vrbrowser.VRBrowserActivity' | ||
launchCmd: 'adb shell am start -n org.mozilla.vrbrowser/.VRBrowserActivity --es url "{URL}" --ez dom.vr.require-gesture false --ez privacy.reduceTimerPrecision false' | ||
}, | ||
@@ -109,9 +110,9 @@ { | ||
function launchUrl(url, selectedBrowser) { | ||
var browser = typeof selectedBrowser === 'undefined' ? getBrowsers()[0] : getBrowsers(selectedBrowser); | ||
var browser = typeof selectedBrowser === 'undefined' ? getBrowsers()[0] : getBrowsers(selectedBrowser)[0]; | ||
if (!browser) { | ||
console.log("No browser found"); | ||
console.log('No browser found'); | ||
return; | ||
} | ||
const output = shell.exec(browser.launchCmd.replace('{URL}', url, options)); | ||
var cmd = browser.launchCmd.replace('{URL}', url).replace(/&/gi, '\&'); | ||
const output = shell.exec(cmd, options); | ||
} | ||
@@ -138,2 +139,6 @@ | ||
function forceStop(package) { | ||
const output = shell.exec(`adb shell am force-stop ${package}`); | ||
} | ||
module.exports = { | ||
@@ -147,3 +152,4 @@ getDevices: getDevices, | ||
getBrowsers: getBrowsers, | ||
launchUrl: launchUrl | ||
launchUrl: launchUrl, | ||
forceStop: forceStop | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6533
140