Skip to content

A plugin for turning Wifi on / off in Phonegap apps targeting Android devices.

License

Notifications You must be signed in to change notification settings

ryanjairam/wifi-control-phonegap-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wifi control Phonegap plugin (Android Only)

1. Description

A plugin for turning Wifi on / off in Phonegap apps targeting Android devices.

2. Installation from GitHub

$ phonegap plugin add https://github.com/RyanJairam/wifi-control-phonegap-plugin

3. Usage

Add the CHANGE_WIFI_STATE permission to /platforms/Android/AndroidManifest.xml

<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />

Turn Wifi off

 window.WifiControlPlugin.setWifi('off', function(){ 
    // success
 },
 function(){
    // error
 });

Turn Wifi on

 window.WifiControlPlugin.setWifi('on', function(){ 
    // success
 },
 function(){
    // error
 });

About

A plugin for turning Wifi on / off in Phonegap apps targeting Android devices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published