Ability to access NFC settings on Android Wear programmatically

Viewed 601

I have an Android Wear 2.0 watch (Huawei Watch 2) with NFC. Having NFC on in the background, I've found, uses up a lot of battery so I've made an app that lets me easily turn it on before using Android Pay and turn it off after.

One hiccup though: while I can easily directly launch into WiFi settings with

startActivity(new Intent(Settings.ACTION_WIFI_SETTINGS))

I can't launch into NFC settings with Settings.ACTION_NFC_SETTINGS (the settings app opens but crashes) nor into all Connectivity settings with Settings.ACTION_WIRELESS_SETTINGS (the settings app never opens).

So, how can I programmatically launch directly into the NFC pane of Settings rather than just into the Settings app on my Android Wear 2 watch?

Edit: I've tried the standard way of doing it on Android phones, which is to launch either NFC_SETTINGS or WIRELESS_SETTINGS, but both fail, and I'm looking for info on how to get around that on a watch, so my question is definitely not a duplicate.

I'm open to any solution, from an Accessibility service to an intent to a hidden activity I'm not aware of.

1 Answers
Related