Created
August 6, 2013 22:43
-
-
Save egomez99/6169481 to your computer and use it in GitHub Desktop.
Get WIFI SSID (network name) from Android module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// open a single window | |
var win = Ti.UI.createWindow({ | |
backgroundColor : 'white' | |
}); | |
var label = Ti.UI.createLabel(); | |
win.add(label); | |
win.open(); | |
// TODO: write your module tests here | |
var wifissid = require('org.appcelerator.wifissid'); | |
Ti.API.info("module is => " + wifissid); | |
label.text = wifissid.example(); | |
Ti.API.info("module exampleProp is => " + wifissid.exampleProp); | |
wifissid.exampleProp = "This is a test value"; | |
if (Ti.Platform.name == "android") { | |
var WIFI_SSID = wifissid.getWifiSSID(); | |
Ti.API.info( "####### WIFI SSID: "+ WIFI_SSID ); | |
alert("WIFI_SSID: "+ WIFI_SSID ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment