My android app stops sending data after a day or two - Android Q&A, Help & Troubleshooting

Hello fellow developers,
I am having trouble with an Android app I am working on that is programmed to send GPS data to a web service every 2 hours. The issue is that after about a day, the service appears to be interrupted on the phone, and data is no longer sent.
To troubleshoot this issue, I have tried the following with no success:
I have checked the app for error messages or exceptions, but none are being thrown when it stops sending data to the web service.
I have set an alarm to see that keeps the app working in non-interactive mode. It works for a few days and then stops again even with the alarm set and going off everyday.
I have checked the web service logs, but there are no errors or issues on that side that would prevent the data from being received.
I have tested the app on multiple devices, and the issue occurs mostly in Sony Xperia, Samsung S22 etc.
I have tried different intervals for sending the GPS data to the web service (e.g., every 10 mins), but the issue persists.
I have tried wakelock/caffiene apps to keep the CPU running.
All Android settings are set to not let the app go to sleep and to ignore battery optimization for my app, and it is also a foreground service.
I am wondering if anyone has any insight into what could be causing this issue and how to fix it? I appreciate any help or advice you can offer!

Related

GPS position locking on Androids for days

Hello everyone!
We have an fleet management app that runs continuous background updates every 1 minute using an Android service. We are seeing that sometimes the devices are failing to receive new GPS locations, and continuously report that they are at one location, when they are actually somewhere else. You can imagine this doesn't work well for a fleet management app. Rebooting the device seems to rectify the problem in the short-term. It also doesn't happen on every phone, even if they are the same model with same fw.
Any ideas? Thanks!

[Q] What causes the Gmail app to leave outgoing messages stuck in the Outbox?

Hi, for years now (and on many different phones and Android OS versions), I've run into a reoccurring issue in the Gmail app: now and again, a batch of messages I've told the app to send will get stuck in the Outbox as "Sending" and won't ever send, even after I've rebooted the phone, cleared the cache, insured the phone is online, etc... This only seems to happen when there's some sort of an internet connection issue, but I haven't been able to figure out if it's associated with one particular thing: airplane mode, being out of connection range, having auto-sync or background data turned off, etc... Does anyone know what triggers this behavior? If it was caused by being in one particular state, I'd just avoid sending email while in that state.
Thanks, Alan
Ugh!!!! Was hoping the 4.2 update might have fixed this, but no luck. Has Google even acknowledged this issue yet? It's MADDENING!

[Q] Play Services cut-off my cellular abilities when there's no internet

Hi everyone - I actually don't know who else to ask but this issue has been driving me mental for the last couple of months. After days and nights of investigating and looking through various forums and articles, I think I can find (or try at least) the words to describe my problem more...technically))
So OK, first off the device is Huawei Ascend G510-0100 running KitKat under the Cyanogenmod platform but the issue was already present with the factory's 4.1 ROM. I thought rooting the phone, installing just brand-new everything and having a bloatware/clutter-free Android OS would rectify all the causes of this nightmare but no. I'm not the only one with this problem: Google-search the issue and you'll find numerous forum threads where users seek for a solution to this "software loophole" as well as one of my friends (Galaxy S2) and another one with the HTC One X+ so I rule out my phone's model, OS version or just my device being faulty from the list of potential causes.
So - every time I turn my WiFi off on purpose or when I go out of my house (where logically my phone looses home's wireless signal) - the location services and the app synchronization processes stumble, mess up, run into and furthermore cause internal system mess-ups from such "unexpected" losts of internet. After that I can't make a phone call, send SMS or run USSD codes (checking credit balance etc) but I can still receive calls and texts - basically I fail to reach my cellular services but the service can still reach me. Turning Airplane Mode on and then off or simply restarting the phone altogether temporary fixes the cellular problem until the next time the internet becomes unreachable to Play Services. I tried turning location and sync off, tried different location/sync options...I wish I could disable Play Services but then I wouldn't be able to use the Play Store - | tried messing around with probably every single option available and possible but the Play Services still failed me and.......I honestly don't know what am I missing and where to look next
Edit: (I never use the mobile data btw)
Any suggestions? Anybody? I'm hopeless at this point :crying:
Thank you all...
...
Anyone? Please...

Data not syncing consistently on all firmwares

Hi guys,
First let me explain the situation: I've noticed recently that a lot of my apps, such as Gmail, Facebook Groups, Messenger and pretty much any app I need to have instantaneous notifications, aren't syncing properly. I might get notifications an hour or more after they are delivered. Even when I force-sync an app, such as refreshing the notification feed on Facebook Groups, there are delays that can go on indefinite until I get sick of waiting. I don't even know what the conditions are for this problem to occur because other times such as on WiFi, I have pretty consistent data syncing. Just a couple minutes ago I tried turning on and off airplane mode which seems to have fixed the issue. I'm going to see how long this lasts.
Here is the app I'm currently using that may affect data synchronization.
- Greenify: same problem persists regardless of settings and root. Haven't tried completely uninstalling it.
So just to be clear this issue persists from firmware to firmware regardless of Android version. I've had many android phones and am very aware of flashing procedures and all the ways to enhance my phone. My phone is unlocked and I flash firmwares using flash tool. I've tried fixing this issue by running rooted and unrooted to no avail. I've also taken all these apps out of the doze mode and turned them all on as priority.
Please let me know if you have any solution to this. It's costing me business.
Thanks!

Notifications late or not showing on wifi connection

Hello everyone,
I've been having this issue for several months now where all my social apps like messenger, instagram, whatsapp, flock, gmail and so on won't show notifications when my phone is connected to any type of wifi.
The notifications are late, or they show up when i open the app. Sometimes they repeat themselves even after i checked, like something is blocking them till some point.
I tried SO MANY things to fix this (factory reset, disable device care and any battery saving settings, reinstalled apps,...) and ended up using 4g all the time as the most solid one for the time being.
It's just very frustrating that something as simple is this is not getting fixed for a long time now.
Does anyone have similar issues? Or maybe even a fix for this? I noticed this happening to other people around me using different samsung devices.
I don't know if this is a samsung related issue or something else.
Thanks!

Categories

Resources