All Projects → petervojtek → cordova-plugin-shell-exec

petervojtek / cordova-plugin-shell-exec

Licence: Apache-2.0 license
Apache Cordova Plugin to Execute Commands in Smartphone's Operating System Shell

Programming Languages

java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to cordova-plugin-shell-exec

Google Analytics Plugin
Cordova Google Analytics Plugin for Android & iOS
Stars: ✭ 90 (+200%)
Mutual labels:  cordova-plugin
Cordova Plugin Audioinput
This iOS/Android Cordova/PhoneGap plugin enables audio capture from the device microphone, by in near real-time forwarding audio to the web layer of your application. A typical usage scenario for this plugin would be to use the captured audio as source for a web audio node chain, where it then can be analyzed, manipulated and/or played.
Stars: ✭ 137 (+356.67%)
Mutual labels:  cordova-plugin
Cordova Plugin Touch Id
💅 👱‍♂️ Forget passwords, use a fingerprint scanner!
Stars: ✭ 209 (+596.67%)
Mutual labels:  cordova-plugin
Awesome Ionic
😎 A curated list of amazingly awesome Ionic libraries, resources and solutions.
Stars: ✭ 1,340 (+4366.67%)
Mutual labels:  cordova-plugin
Cordova Plugin Wkwebview File Xhr
Cordova Plugin for WebView File XHR
Stars: ✭ 116 (+286.67%)
Mutual labels:  cordova-plugin
Cordova Plugin Speechrecognition
🎤 Cordova Plugin for Speech Recognition
Stars: ✭ 174 (+480%)
Mutual labels:  cordova-plugin
Cordova Plugin Stripe
A Cordova plugin that lets you use Stripe's Native SDKs for Android and iOS.
Stars: ✭ 90 (+200%)
Mutual labels:  cordova-plugin
cordova-fonts
Cordova plugin for enumerating fonts on a mobile device
Stars: ✭ 14 (-53.33%)
Mutual labels:  cordova-plugin
Cordova Plugin Baidumaplocation
Get device current Location from Baidu Map
Stars: ✭ 137 (+356.67%)
Mutual labels:  cordova-plugin
Ionic Native Mocks
Ionic Native Mocks are designed to be used as placeholders during development for the actual Ionic Native modules.
Stars: ✭ 207 (+590%)
Mutual labels:  cordova-plugin
Cordova Broadcaster
Cordova Plugin to allow message exchange between javascript and native (and viceversa)
Stars: ✭ 104 (+246.67%)
Mutual labels:  cordova-plugin
Cordova Plugin Add Swift Support
🔨 Swiftify your Cordova app !
Stars: ✭ 108 (+260%)
Mutual labels:  cordova-plugin
Wikitude Cordova Plugin
Wikitude's Augmented Reality Plugin for Cordova - working together with the Wikitude SDK library for Android and iOS. Provides image recognition and tracking, geo-based augmente reality and 3D rendering and animations in an augmented reality scene
Stars: ✭ 197 (+556.67%)
Mutual labels:  cordova-plugin
Unityionicintegration
A guide to integrating Unity 3D content into an Ionic app and sending messages between them (for Android & iOS)(tested with Vuforia plugin)
Stars: ✭ 94 (+213.33%)
Mutual labels:  cordova-plugin
Cordova Plugin Local Notifications
Cordova Local-Notification Plugin
Stars: ✭ 2,525 (+8316.67%)
Mutual labels:  cordova-plugin
Cordova Plugin Remote Injection
DEPRECATED: Cordova plugin to allow a remote site to interact with cordova's javascript APIs when loaded within a cordova app.
Stars: ✭ 90 (+200%)
Mutual labels:  cordova-plugin
Cordova Plugin Photo Library
Maintainer needed. Please contact if you're using this library in your project
Stars: ✭ 140 (+366.67%)
Mutual labels:  cordova-plugin
cordova-plugin-android-window-background
Simple Cordova plugin to set Android window background on start-up 🎨 🍭
Stars: ✭ 15 (-50%)
Mutual labels:  cordova-plugin
Cordova Plugin Fingerprint Aio
👆 📱 Cordova Plugin for fingerprint sensors (and FaceID) with Android and iOS support
Stars: ✭ 236 (+686.67%)
Mutual labels:  cordova-plugin
Cordova weibo
A Cordova wrapper around the Sina WeiboSDK for Android and iOS. Provides access to ssoLogin, WeiboSharing etc...
Stars: ✭ 202 (+573.33%)
Mutual labels:  cordova-plugin

cordova-plugin-shell-exec

Apache Cordova Plugin to Execute Commands in Smartphone's Operating System Shell

Supported Platforms

  • Android

Installation

$ cordova plugin add https://github.com/petervojtek/cordova-plugin-shell-exec.git

Usage

window.ShellExec.exec(cmd, callback)

cmd can be either a single string or an array of string arguments.

callback function will return a hash with two keys - exitStatus and output.

Example:

window.ShellExec.exec('uptime', function(res){
  console.log('exit status: ' + res.exitStatus)
  console.log('cmd output: ' + res.output)
})

JS console output:

exit status: 0
cmd output: up time: 10 days, 05:16:51, idle time: 17 days, 01:22:57, sleep time: 5 days, 16:38:37

If command execution fails (e.g. you enter wrong command), you receive exit status 100.

Example with root:

window.ShellExec.exec(['su', '-c', 'touch /sdcard/test.txt'], function(res){
  console.log('exit status: ' + res.exitStatus)
  console.log('cmd output: ' + res.output)
})

How to Contribute

Use pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].