Android NFC Locks up / Stops Scanning after Repetative Scans - Android Q&A, Help & Troubleshooting

Overview: We have developed an app that allows customers check in using an NFC enabled card with a stationary Nexus S. The app sit ready to read a card, when a card is tapped, the app reads the unique ID for the NFC card.
Problem: The challenge we have run into, is that the Nexus S locks up after scanning 50 to 100 tags. The app continues to function, and so does android, however neither our app, or the native app within android will read a tag. It is as though the scanner has been disabled. I have tested it using 4 different Nexus S devices running Android 2.3.6.
Debugging: The only solution I have been able to find is to either: - power the nexus s off and then power it back on - disable NFC and then re-enable it through Setting --> Wireless & network settings --> NFC
If either of those are done, the scanner works again and app continues to work as normal until it locks up again after 70 or so scans.
Any idea how to fix this bug, or work around the issue?
Update: it appears as though this is not just with our app, testing the "Tags" native app that comes with the Nexus S also has this issue.

Do you see any output in logcat relevant to NFC?

Related

Issues so far

I've only had my watch 16 hours or so (7 of which I was asleep), and I like it, and plan to develop apps for it..... but I have the following issues:
Updated (9 Jul)
Take a note voice command just sends me an email, instead of using something like Google Keep
The screen dims for a second before screen turns off (or goes to clock) - if I do OK Google during this time it ignores it
Set a Timer voice command does not work - options set an alarm menu
No music controls when I use default music player, or RocketPlayer Solved my Wear Music Controller
When doing a voice search, it often says Disconnected. 6 times so far, one time I had to restart watch before it could reconnect.
Dictating a longish email will eventually fail, even though it recognized loads of the words.
Step count often not updated on homescreen widget, despite it showing a higher number in the actual watch app
Dismissing a google now card (weather for example), you can't get it back if you did it by mistake
Navigation started from watch sits on Calulating route... if music playing on phone with screen locked.
Screen stays on while charging (reported by dunjamon) Solved by Slumber
I have it paired with HTC One S with Liberty S4 MAX custom ROM.
Anyone else have these issues (what device do you have it paired with)? Or know how to fix/work around them?
I have 4 and 7 8 D:
Number 1 confused me for a while. I searched everything on my phone before I realised that it had just emailed me. With number 7, I've turned off the step count...yet it still tells me my total of 0.
Also, is with the screen always on settings set to no, when you put it on charge the screen stays on. It's a nightmare at night, I have to turn it off and then boot it back up in the morning. There needs to be some kind of sleep mode or setting to allow the screen to be off while charging.
I've had 3 and 5
5 is a bit annoying. I'm hoping a restart means it won't recur as I go thru the day...
dunjamon said:
Number 1 confused me for a while. I searched everything on my phone before I realised that it had just emailed me. With number 7, I've turned off the step count...yet it still tells me my total of 0.
Also, is with the screen always on settings set to no, when you put it on charge the screen stays on. It's a nightmare at night, I have to turn it off and then boot it back up in the morning. There needs to be some kind of sleep mode or setting to allow the screen to be off while charging.
Click to expand...
Click to collapse
There is. Enable developer settings and set if the screen show stay on or not during charging
biggiephat said:
There is. Enable developer settings and set if the screen show stay on or not during charging
Click to expand...
Click to collapse
I didn't know about these developer options: Tapping build version several times works, same as a phone. The "Stay awake when charging" option is disabled by default however. I've only recently enabled the "always keep screen on" mode, so will be interesting to see what happens when charging tonight...
Regarding 1) It has started working! I installed Evernote for Android Wear from play store, also Baby Time and Draw Watch. I also resycn'ed all apps using the option in the Android Wear companion app.
Next time I did "take a note", it asked if I wanted to complete Action using Keep or Evernote, so I chose Keep. I also can see Keep in the list of apps on watch (before it wasn't there). The note was stored in Keep. Still works after uninstalling Evernote.
Regarding 4) I installed Music (Remix) Trial from play store, and Pause, Prev, Next actions are now on my watch. Unfortunately, the buttons do nothing. Not sure if this is an issue with my particular phone or what... Anyone else tried this app?
biggiephat said:
There is. Enable developer settings and set if the screen show stay on or not during charging
Click to expand...
Click to collapse
I've already disabled the stay awake while charging option. Unless it needs to be activated and then the watch itself to be set to not be always on. Will have another play tonight.
I've also noticed Keep show up in the apps now after another update. Will test out another note and see where it goes.
Got none of these problems with my watch. Fix for 8: If eg you swiped away the weather just say "ok google, what's the weather". after it told you the card should be back. this works for me, also with others like world clock, steps etc.
Just tried the screen off while charging and it doesn't work. The only way I can get the screen to turn off is to put it on charge and then on my phone set the screen to go off.
I actually have none of these issues...
barkside said:
Regarding 1) It has started working! I installed Evernote for Android Wear from play store, also Baby Time and Draw Watch. I also resycn'ed all apps using the option in the Android Wear companion app.
Next time I did "take a note", it asked if I wanted to complete Action using Keep or Evernote, so I chose Keep. I also can see Keep in the list of apps on watch (before it wasn't there). The note was stored in Keep. Still works after uninstalling Evernote.
Regarding 4) I installed Music (Remix) Trial from play store, and Pause, Prev, Next actions are now on my watch. Unfortunately, the buttons do nothing. Not sure if this is an issue with my particular phone or what... Anyone else tried this app?
Click to expand...
Click to collapse
i have the same problem with my music controls (nexus5 android L preview)
drsouly said:
i have the same problem with my music controls (nexus5 android L preview)
Click to expand...
Click to collapse
Music controls working fine, paired with Nexus 5 Android 4.4.4 Stock.
alistairs1 said:
Music controls working fine, paired with Nexus 5 Android 4.4.4 Stock.
Click to expand...
Click to collapse
I hope it isn't the case where everything will only work flawlessly with the latest Nexus devices. Have Google tested Wear with anything older?
I suppose it would make good business sense to encourage peeps to fork out for a Nexus 5 after spending money on a Wear watch...
Another issue I'm seeing is starting a Navigation from the watch won't work if I have music playing on my phone (phone lockscreen has music player UI). It just sits there on Calculating route... I'll add this to my list (and others from other peeps)
barkside said:
I've only had my watch 16 hours or so (7 of which I was asleep), and I like it, and plan to develop apps for it..... but I have the following issues:
Updated (9 Jul)
Take a note voice command just sends me an email, instead of using something like Google Keep
The screen dims for a second before screen turns off (or goes to clock) - if I do OK Google during this time it ignores it
Set a Timer voice command does not work - options set an alarm menu
No music controls when I use default music player, or RocketPlayer
When doing a voice search, it often says Disconnected. 6 times so far, one time I had to restart watch before it could reconnect.
Dictating a longish email will eventually fail, even though it recognized loads of the words.
Step count often not updated on homescreen widget, despite it showing a higher number in the actual watch app
Dismissing a google now card (weather for example), you can't get it back if you did it by mistake
Navigation started from watch sits on Calulating route... if music playing on phone with screen locked.
Screen stays on while charging (reported by dunjamon)
I have it paired with HTC One S with Liberty S4 v9 custom ROM.
Anyone else have these issues (what device do you have it paired with)? Or know how to fix/work around them?
Click to expand...
Click to collapse
Number 4, music control, works well with Pandora. I like that I can start Pandora by voice, but there's no way to shut it down the same way.
Number 8, the disappearing cards was giving me hell on stocks. To resolve, I opened a browser on my workstation, Googled "quote xom" or whatever stock, and then the stocks card reappeared. I suspect a simple "Ok, Google...quote XOM" might do the same thing.
None of these issues. Nexus 5 Stock 4.4.4. You are also using a custom ROM so.....
Sent from my Nexus 5 using XDA Free mobile app
No 3. Timer kicks straight into Alarm picker. Timer does work when you get to Google screen, swipe up and manually select it. But that's not a solution. I'm on stock 4.3.
Having the control issue with google play music and youtube when connected to chromecast he buttons wouldn't work and with youtube wven tho there was nothing playing the buttons were still on the watch and couldn't be dismissed
also having the connection issues if i take the watch out of the reach of the phone the app won't reconnect unless i go into the app myself to do it even then the watch says it's not connected when using ok google
EDIT: Happened again this time can't get the Ok Google working at all
Anybody else having issues where raising your arm to activate "Ok Google"isn't working consistently? We've got 2 watches in the house, and I've worn both. Same issue. Seems like if you don't use it for awhile, the arm motion won't wake the watch back up.
Sent from my HTC One_M8 using Tapatalk
I'm having some of the same issues. I've had a few smart watches to compare.
-My Gear 2 worked way better as far as waking up when raising my arm. The LG G is difficult to wake by raising my arm.
-Bluetooth doesn't connect automatically when I get back in range of my phone. The other smart watches have done this that I have owned so not sure why this issue exists.
-There's no way to set the screen timeout. This thing times out very quick. Personally, I have no problem charging my batt every night so I would like to take advantage of the 30 or so % that is left on the watch each night by increasing the screen time out, vibration duration etc.
-I have a difficult time getting cards back after deleting even if I search for the stock, weather, etc. again.
-No way to reply to text messages.
I'll add more as they hit me.

CAT S40 - NFC does not work after a reboot

Hello,
I am working in our company with CAT S40. We have 10 of this devices and all show the same behaviour:
1. I turn on the NFC option to read NFC tags.
2. I Start an app which can read NFC tags.
3. I am reading with the app several tags
4. I make a power off of the CAT S40 and turn it then on again (or make a restart)
5. I am starting again the NFC app and I can not read any NFC tags anymore
6. I go to the setting and checking the NFC settings. The NFC setting is set to ON.
7. I turn OFF the NFC settings and then turn them ON again
8. Now I switch back to the NFC reading app and now it is possible to read tags
Has anybody experience with this behaviour and how can I solve this issue?

Spotify + bluetooth audio disconnects

I use Spotify in my car and have set it to manually manage and allow it to run in the background..
However, the audio always cuts off to after a while after the screen goes off.
When I wake the phone I see Spotify still playing (audio via fone now, but this means it's kept running in background which is good) and Bluetooth remains connected to the device. It's like the android system just stops sending audio via Bluetooth after a while
Does anyone know how to solve this? My only workaround now is to keep the phone awake via an app like Google maps...
I'm on mate 10 pro. 8.0.0.131 c636
Sent from my BLA-L29 using Tapatalk
Same for me with deezer app and car audio which hadn't any disconnects on my other mobiles. No help though....
I tried to change the codec in developer options, which didn't change. I hadn't any bluetooth cutoff since then (couple of days now). Maybe coincidence.
I have discovered the same problem just today (my mate pro is fairly new). It is clearly a software bug. It also fails to update the track name on my car stereo - still shows the first track name even several tracks in.
To get it playing again I turned Bluetooth on and off. Quite annoying. I hope it gets fixed.
happens on my P10, happens on my mate10 pro as well.
It's not a bug, just unintuitive EMUI.
Fix Launch settings for Spotify and add the app on the "Ignore battery optimization"-list under Special Access menu.
It can be difficult to find. Search for "Special" and it will pop up, or click
Settings/Apps & notifications/Apps/Settings/Special Access/ignore battery optimization/
vembryrsig9 said:
It's not a bug, just unintuitive EMUI.
Fix Launch settings for Spotify and add the app on the "Ignore battery optimization"-list under Special Access menu.
It can be difficult to find. Search for "Special" and it will pop up, or click
Settings/Apps & notifications/Apps/Settings/Special Access/ignore battery optimization/
Click to expand...
Click to collapse
I did try this and it still doesn't work.
I don't think it's an issue with the app itself as this also happens on stock music app on stock launcher.
Audio cuts out, plays via the phone speakers so the app itself isn't being optimized or shutdown.. Seems like the Bluetooth function is though
Sent from my BLA-L29 using Tapatalk
I set spotify up with battery optimisation off and with manual launch in battery settings as part of my initial set up. That is not the cause of this Bluetooth problem, unfortunately.
Mine cuts off regardless of app and screentime... so even if i am playing music behind navigation, the bluetooth audio still pushes via the phone after a while
bluetooth still showing connected to the device.
The issue seems resolved for me, but don't know exactly what fixed it.
The only 2 things I did was to manually manage all apps(battery settings), prevent almost all apps from running in background except the audio apps (music/Spotify, and other impt widgets.. Which was already done previously)
And reset defaults on developer mode (not that i changed anything)
See if u guys have any luck with this
Sent from my BLA-L29 using Tapatalk
Hey guys,
Greetings from a Mediapad owner. (EMUI should have it's own subforum)
I first experienced this issue, or a similar issue for myself a few days ago - audio would cut out with the screen off, and would be choppy at best with the screen on (but my music player in the background). The music player itself would stay open, and as soon as I put in the foreground, audio would resume from where it left off (i.e. playback would be paused while the app was in the background).
I am also looking for insight. My suspicion is that EMUI's launch feature is responsible for killing an Android system process related to media, bluetooth, and/or battery optimization in this instance. Launch only allows you to specify preferences for user apps; system apps are managed automatically by Launch no?
Here is the insight I can provide:
This issue went away for me as soon as I plugged in a charger. Connected to a charger, EMUI's battery optimization is apparently less aggressive.
After trying random things, I once again attempted to stream music in the background without a charger plugged in. Eventually, the issue fixed itself. I am not sure if I did anything to accomplish that, however there are two things that may have contributed:
As with another poster above, I tried to change the bluetooth driver in Developer Settings. I was unsuccessful and there was no change for a while after.
The other thing I did, is I found what I think is the standard Android battery usage screen that EMUI hides from us, and I played around with it. This screen showed me that "Android System" was not set to ignore battery optimization. I tried to change that and couldn't. Really, I didn't change anything, but in this process it is possible that an Android system app relating to battery optimization may have been reopened after having been killed off?
The only way I know how to access that screen btw, is to download an app titled 'pNutsAnySettings' and then click on the tile with the battery percentage on it.
I had exactly the same issue with my Mate 10 pro in my car. Audio would cut off from car and continue playing on the phone but the car said it was still connected to the phone. I had the same kind of issue with my Garmin Forerunner watch which would constantly disconnect throughout the day meaning I missed smart notifications.
I found on another thread (Cant remember what one) that if you have root, use Titanium Backup to freeze the Power Genius app. Since doing this a few weeks ago I have not had the issue again in the car and my Garmin now stays connected all day and night
djclark25 said:
I found on another thread (Cant remember what one) that if you have root, use Titanium Backup to freeze the Power Genius app. Since doing this a few weeks ago I have not had the issue again in the car and my Garmin now stays connected all day and night
Click to expand...
Click to collapse
I read that same thing as well - but freezing the Power Genius app (via Xposed Edge Pro) didn't help in my case. Maybe it would have if I had rebooted, or something.
In any event, I believe that freezing the Power Genius app partially if not fully disables EMUI's launch feature, which I generally like...
This problem returned for me last night. I turned bluetooth off and back on again. That fixed it.
My mate 10 Pro does this too. 2011 Camaro SS with MyLink conversion. I go into BY, hit the info icon and disconnects the media playback then reconnect it. Works for a few days. Comes back. No clue why
(Unrooted stock btw)
Update: I finally disabled Power Genius and rebooted. No more pesky issues and if anything my battery life has improved. Only differences I observe (on my Mediapad): there are no longer 'app usage' battery stats inside the EMUI settings app (I can access them by other means), and Launch now needs to be managed through the Settings app (rather than the App Info screen).
thref23 said:
Update: I finally disabled Power Genius and rebooted. No more pesky issues and if anything my battery life has improved. Only differences I observe (on my Mediapad): there are no longer 'app usage' battery stats inside the EMUI settings app (I can access them by other means), and Launch now needs to be managed through the Settings app (rather than the App Info screen).
Click to expand...
Click to collapse
What app now
leo72793 said:
What app now
Click to expand...
Click to collapse
The app you need to freeze or disable is Power Genius. It's a component of EMUI. It won't show up in your main app list, but if you are rooted you can use an app like Titanium or Service Disabler to do the trick. If you aren't rooted - this is a prime example of why people root.
If that's what you were asking?

How to record memory usage to troubleshoot random, non-reproducible crashes/errors

I am the mobile device manager for my company. We use Samsung Tab S4 tablets (Oreo 8.1) and Mobicontrol MDM for field workers and have been experiencing issues that we have not been able to recreate. The app in question is CAPI by Confirmit. We have been working with their devs but so far they have not been able to explain what is happening.
We have an alert set up in Mobicontrol to alert us to excessive memory usage but every time we receive the alert we have to hope to catch it in time to be able to remote tot he device to have a look but we have yet to be able to catch it in the moment, by the time we gain access the condition has subsided. Sometimes we get the RAM alert only, sometimes we get it in conjunction with an app crash, sometimes the app crashes without an alert. It may be that the memory spike is too brief to trip the alert, or it may be that they are only coincidental and not related at all. we just don't know.
I have been trying to find some sort of "flight data recorder" equivalent that can run on these devices that will be monitoring so that when the app crashes, or when a preset memory threshold has been exceeded, we can inspect the recorded data from the time previous to the event to hopefully identify the cause(s). So far I have been unable to find anything that does this, and my efforts at using Tasker, Elixir 2 with E Robot, MacroDroid, etc have been unsuccessful.
One of the major limitations we face is that the devices are in the hands of technically unsophisticated users. We lock down the devices fairly tightly using Mobicontrol application whitelists to limit what they users can do, but whatever solution we might come up with would have to be able to be communicated to and reliably executed by these non-technical users.
I thought maybe that enabling Developer Options and configuring debugging in the power menu would be an easy way to get debug logs but we don't permit Google or other accounts so email, Drive, etc are not options and I can't figure a way to save the logs to a local folder accessible by Mobicontrol so we can remote to the tablet to retrieve it. Nearby devices, Wifi Direct, or adb/USB connections don't work, either.
Any ideas? Would appreciate any thoughts or comments that might help us drive toward resolution of this problem.
Thanks!

Disable Doze function entirely

I have tried now on two newer Android phones (Huawei Mate 20 with Android 10, Samsung Galaxy A7 2018 with Android 9) what happens if I track my position with GPS and then stop for 30+ minutes.
The result is every time, on both devices, that the GPS signal is lost after stopping for 10-30 minutes, and it is not regained without manually waking up the phone (wakeup Apps don't work, moving again doesn't work).
This happens with all tracking apps I've tried (about 10); I tried the different location modes; I have turned off ALL options which are for power saving, for all apps; I even deinstalled PowerGenie and the SystemManager on the Huawei device via ADB. Therefore, this is definitely NOT a problem of settings, nor of a specific firmware.
I now suspect that the aggressive "Doze" feature that was introduced in Android 6 is responsible for this. So is there any way to completely disable it?
I want that GPS tracking will continue regardless of whether I move or not, will always try to reconnect when signal is lost, until the battery is at 5% or less - without me touching the phone even once after starting the tracking app.

Categories

Resources