switch NFC off after 5 minutes of use

384 views
Skip to first unread message

Andreas S.

unread,
Feb 10, 2023, 9:50:27 AM2/10/23
to Automate
Hello
I want to create a task that can switch off NFC 5 minutes after activating NFC. So I can use NFC for paying something and save battery. I know I can easily switch NFC manually, but usually I forget it. That's why I task  like this would be very helpful.
Any help? thanks

Shari Shark

unread,
Feb 10, 2023, 10:07:49 AM2/10/23
to automa...@googlegroups.com
Qed.

Flow start -> check NFC state -> if yes -> delay 5 minutes -> set NFC disabled

Then both no path and set NFC loop back to check NFC state.

--
You received this message because you are subscribed to the Google Groups "Automate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to automate-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/automate-user/2712f7ea-4cae-466e-b2cf-4d83d4a93f87n%40googlegroups.com.

Andreas S.

unread,
Feb 10, 2023, 10:12:02 AM2/10/23
to Automate
yes, but this does not work with android 13. according to the app my phone must be rooted

Andreas S.

unread,
Feb 10, 2023, 10:17:53 AM2/10/23
to Automate
and if I try it I get aava.lang.security error

Andreas S.

unread,
Feb 10, 2023, 10:43:18 AM2/10/23
to Automate
I also tried adb command, but also does not work

adb shell svc nfc disable
adb shell service call nfc 6

Henrik "The Developer" Lindqvist

unread,
Feb 10, 2023, 11:50:15 AM2/10/23
to Automate
If you by "adb command" mean the ADB shell command block then as the documentation say, "The command should be formatted as it would when executed at a shell prompt (without adb shell prefix),"
svc nfc disable works a expected on my device.
Reply all
Reply to author
Forward
0 new messages