I trying to change NFC settings (on/off) programmatically on Android 2.3.3.
On the phone, under the "Wireless & network settings",
you can choose to set whether you want to use NFC to read and exchange tags or not.
So I would like to toggle this setting in my application.
But I can't seem to find an api for this.
I'm looking for some code that would probably look like this:
WifiManager wifi = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
wifi.setWifiEnabled( on/off );
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…