I have an Android Wear 2.0 watch (Huawei Watch 2) with NFC. Having NFC in the background, I found it uses a lot of battery, so I made an application that allows me to easily turn it on before using Android Pay and turn it off after.
One hiccup: although I can easily launch WiFi settings right away using
startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS))
I canβt run into NFC settings using Settings.ACTION_NFC_SETTINGS(the settings application opens, but it crashes), nor to all the connection settings using Settings.ACTION_WIRELESS_SETTINGS(the settings application never opens).
So, how can I programmatically launch directly in the NFC settings panel, and not just in the Settings application on my Wear 2 Android device?
Edit: I tried the standard way of doing this on Android phones that runs either NFC_SETTINGS or WIRELESS_SETTINGS, but both do not work, and I'm looking for information on how to get around this on the watch, so my question is definitely not duplicated.
I am open to any decision, from accessibility services to the intention of covert activities that I do not know about.
source
share