Created
June 22, 2015 20:57
-
-
Save javawolfpack/36ea12e1216cdaba016a to your computer and use it in GitHub Desktop.
WiFi Lock Example from lecture on different version
This file contains 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
WifiLock lk; | |
final int sdkVersion = Integer.parseInt(Build.VERSION.SDK); | |
if (sdkVersion >= Build.VERSION_CODES.HONEYCOMB_MR1) { | |
Log.d(TAG, "hi-perf wifi lock"); | |
lk = wfManager.createWifiLock(3, "LockTag"); | |
} | |
else{ | |
lk = wfManager.createWifiLock(WifiManager.WIFI_MODE_FULL, "LockTag"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment