Toggle NFC with Set System Setting?

Post your questions and help other users.

Moderator: Martin

Post Reply
Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Toggle NFC with Set System Setting?

Post by Econdoc » 23 Jun 2019 22:31

I activated Set System Setting with adb as per instruction and can confirm that it works; I toggled airplane on and off using it. However, I cannot figure out how to change NFC. The settings are either GLOBAL: airplane_mode_radios with values cell,bluetooth,wifi,nfc,wimax or GLOBAL: airplane_mode_toggleable_radios with values bluetooth, wifi, nfc.

How do I change the value of nfc to turn nfc on or off?

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Toggle NFC with Set System Setting?

Post by Pepy » 23 Jun 2019 23:36

Toggling airplane mode using the global setting airplane_mode_on only changes the state of the QS tile for me; the services (eg. Wi-Fi) remain unaffected.

As far as I know, NFC does not have an associated setting; the ones you mentioned serve a different purpose:
  • airplane_mode_radios: specifies which services should be turned off when airplane mode is enabled.
  • airplane_mode_toggleable_radios: specifies the services that can be enabled again manually whilst airplane mode is active.
Your only other choices are to root and use Set NFC State or Control UI.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: Toggle NFC with Set System Setting?

Post by Econdoc » 23 Jun 2019 23:48

Thanks. That is a very clear explanation.


I have not been able to get NFC to toggle if the phone is asleep or locked or the screen is off. It seems that control UI does not work under these conditions. Do you know a workaround without root?

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Toggle NFC with Set System Setting?

Post by Pepy » 24 Jun 2019 01:15

Control UI manipulates on-screen elements, so the screen is required to be on. And as I said before, either root or Control UI are your only other options that I know of.

Also, bad connection? Might want to delete the duplicate posts.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: Toggle NFC with Set System Setting?

Post by Econdoc » 24 Jun 2019 10:15

Sorry about the multiple posts. I cannot find a way to delete them. :cry: I can edit but not delete.

User avatar
Desmanto
Posts: 2709
Joined: 21 Jul 2017 17:50

Re: Toggle NFC with Set System Setting?

Post by Desmanto » 24 Jun 2019 18:10

@Econdoc : Have you tried to find the value correspond to the nfc state using my secure setting logger flow? It is at : viewtopic.php?f=3&t=7931
Start the logging and toggle the NFC, see what value has changed. Use that in Set System Setting. But I am not sure if your phone reflect the value you set from Set System Setting, have to try it out by yourself.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Toggle NFC with Set System Setting?

Post by Pepy » 25 Jun 2019 06:37

Econdoc wrote:
24 Jun 2019 10:15
Sorry about the multiple posts. I cannot find a way to delete them. :cry: I can edit but not delete.
There should be a little "X" icon at the top right of your posts. By clicking on that, you can delete your post (along with specifying a reason for why). I'm not sure why the "Delete this post" checkbox on the edit screen just throws an error at me, but hopefully the other method should work for you.
Desmanto wrote:
24 Jun 2019 18:10
@Econdoc : Have you tried to find the value correspond to the nfc state using my secure setting logger flow? It is at : viewtopic.php?f=3&t=7931
Start the logging and toggle the NFC, see what value has changed. Use that in Set System Setting. But I am not sure if your phone reflect the value you set from Set System Setting, have to try it out by yourself.
He's already tried searching up the setting; that's how he ended up with those two he posted in the opening post.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

Econdoc
Posts: 153
Joined: 28 May 2016 20:06

Re: Toggle NFC with Set System Setting?

Post by Econdoc » 25 Jun 2019 12:19

I looked again for an "x" while trying to edit a post. I do not see a delete button. I tried using Android (Chrome) and using Windows (Firefox). If it exists, it must be invisible for me. :lol:

Pepy
Posts: 76
Joined: 31 Oct 2018 10:53
Location: Canada

Re: Toggle NFC with Set System Setting?

Post by Pepy » 25 Jun 2019 21:24

@Econdoc
Oh, not when editing a post; the "X" I was referring to is found on the top right of your post in the thread after it's been submitted. The "Delete this post" checkbox under the options on the post edit screen. If you can't find the "X" button though, you're probably too late since it seems to disappear after maybe a day or two; I'll just go ahead and report them as duplicate posts.
Hope my post was helpful :D
Device: OnePlus 5T running crDroid, rooted with Magisk 8-)

Post Reply