Advertisement
Guest User

Untitled

a guest
Feb 19th, 2014
272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.59 KB | None | 0 0
  1.    public String c() {
  2.         final WifiManager wifiManager = (WifiManager)this.getSystemService("wifi");
  3.         WifiInfo connectionInfo;
  4.         if (wifiManager == null) {
  5.             connectionInfo = null;
  6.         }
  7.         else {
  8.             connectionInfo = wifiManager.getConnectionInfo();
  9.         }
  10.         String s;
  11.         if (connectionInfo != null) {
  12.             s = connectionInfo.getMacAddress();
  13.             if (s != null) {
  14.                 s = "8c0f" + s.replaceAll(":", "");
  15.             }
  16.         }
  17.         else {
  18.             s = null;
  19.         }
  20.         return s;
  21.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement