Auto detect server
This commit is contained in:
26
Client/phonegap-wake-on-lan/README.md
Normal file
26
Client/phonegap-wake-on-lan/README.md
Normal file
@@ -0,0 +1,26 @@
|
||||
# PhoneGap Wake On Lan
|
||||
Very basic plugin for sending wake on lan requests from a phonegap app.
|
||||
|
||||
# Installation
|
||||
1. phonegap plugin add https://github.com/lipemat/phonegap-wake-on-lan.git
|
||||
2. Or add `<plugin spec="https://github.com/lipemat/phonegap-wake-on-lan.git" source="git"/>` to your main config.xml
|
||||
|
||||
# Usage in JS
|
||||
~~~~
|
||||
document.addEventListener( 'deviceready', function(){
|
||||
//replace the broadcast ip and mac
|
||||
var BROADCAST = '192.168.1.255';
|
||||
var MAC = '48-2C-6A-1E-59-3D';
|
||||
window.plugins.WakeOnLan.wake( BROADCAST, MAC, function( r ){
|
||||
console.log( r )
|
||||
}, function( r){
|
||||
console.error( r )
|
||||
} );
|
||||
}, false );
|
||||
~~~~
|
||||
|
||||
### That's it! Super straight forward.
|
||||
|
||||
|
||||
|
||||
Wake On Lan Plugin For Cordova/Phonegap
|
||||
Reference in New Issue
Block a user