[DEV] Amazfit Stratos Wi-Fi disabled in stand-by - Amazfit

Good morning,
I'm developing an application to trace the user indoor position.
I'm using Estimote Proximity beacons, I linked each beacon to a room and when the user enters/exits in/from a room I have to send an update to a REST service through Wi-Fi.
Initially I developed an Android application installed on my smartphone; everything worked well, but when I started the beta testing I realised that the user not always keep his smartphone on his pocket, so it was not possible to precisely trace the its position.
Thus I thought that I may run the same application on Amazfit smartwatch; I installed the very same APK on my Stratos watch and everything worked well until when I unplugged the watch from the charger: in battery mode the watch operating system disable the Wi-Fi when it's in stand by.
I tried to activate the wifi programmatically, but nothing it doesn't work.
I read a lot of thread in this forum, but I wasn't able to find any solution, did anyone face this issue?
Any help is appreciated!
Thank you
Marco

marco.manca said:
Good morning,
I'm developing an application to trace the user indoor position.
I'm using Estimote Proximity beacons, I linked each beacon to a room and when the user enters/exits in/from a room I have to send an update to a REST service through Wi-Fi.
Initially I developed an Android application installed on my smartphone; everything worked well, but when I started the beta testing I realised that the user not always keep his smartphone on his pocket, so it was not possible to precisely trace the its position.
Thus I thought that I may run the same application on Amazfit smartwatch; I installed the very same APK on my Stratos watch and everything worked well until when I unplugged the watch from the charger: in battery mode the watch operating system disable the Wi-Fi when it's in stand by.
I tried to activate the wifi programmatically, but nothing it doesn't work.
I read a lot of thread in this forum, but I wasn't able to find any solution, did anyone face this issue?
Any help is appreciated!
Thank you
Marco
Click to expand...
Click to collapse
Amazmod service can keep WiFi enabled on standby. Try to check on GitHub how work
https://github.com/AmazMod/AmazMod

Did you add the proper permissions to your app's manifest? It is trivial as a normal app, the only problem is when it's done in the widget.

fcaronte said:
Amazmod service can keep WiFi enabled on standby. Try to check on GitHub how work
Click to expand...
Click to collapse
Thanks for the quick answer!
I tested AmazMod yesterday, I selected the wi-fi toggle and the Keep Away function but after one hour I didn't receive no more updates on my remote REST service.
Maybe I made some mistakes in Amazmod configuration, can you please explain me how to keep the wi fi enabled?

lfom said:
Did you add the proper permissions to your app's manifest? It is trivial as a normal app, the only problem is when it's done in the widget.
Click to expand...
Click to collapse
Hi,
here are my manifest permissions:
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE"></uses-permission>
I don't think it is a matter of permissions, because at the beginning I receive the update from the watch, so the application is working.
The problem begins when I unplug the watch from the charger.
M

The watch turns off Wi-Fi automatically when run in an app that isn't in the foreground to save battery, of course. So you *can* turn it on, the problem is that it goes off, so you need to add a wakelock when you need to keep Wi-Fi on while screen is locked or the app is running in the background. Be prepared that your app will use lots of battery. You can check PaceOn if you just want to test Wi-Fi.

lfom said:
The watch turns off Wi-Fi automatically when run in an app that isn't in the foreground to save battery, of course. So you *can* turn it on, the problem is that it goes off, so you need to add a wakelock when you need to keep Wi-Fi on while screen is locked or the app is running in the background. Be prepared that your app will use lots of battery. You can check PaceOn if you just want to test Wi-Fi.
Click to expand...
Click to collapse
I tested PaceOn yesterday, with the screen on functionality set to infinity, my app sent only 64 updates..it sends one update per minute, so the wifi has been disabled after about one hour.
I will try to implement a wakelock on my app and I let you know.
Thank you for your support

Related

Turn on GPS/Data automatically when Navigation launched?

I'm looking for a way of automatically turning on GPS and data whenever I launch Google Navigation. I've tried Tasker but it doesn't allow toggling of GPS on the S2. I've also tried AutomateIT but this simply doesn't work - I created a rule to enable GPS when the Maps app was activated but whenever I launch Maps/Navigate it still tells me that GPS is disabled.
Can anyone recommend a good way of doing this?
Did you find out HOW, yet, am still looking , and i know it will be so helpfull.
Like on google navigation start, GPS should be on automatically, and on exit, should turn of again on its own.
With the newest firmwares having GPS in standby doesn`t drain the battery significantly, neither does WiFi. With Bluetooth, WiFi and GPS in standby I`m sitting at 90% after almost nine hours in idle.
itm said:
I'm looking for a way of automatically turning on GPS and data whenever I launch Google Navigation. I've tried Tasker but it doesn't allow toggling of GPS on the S2. I've also tried AutomateIT but this simply doesn't work - I created a rule to enable GPS when the Maps app was activated but whenever I launch Maps/Navigate it still tells me that GPS is disabled.
Can anyone recommend a good way of doing this?
Click to expand...
Click to collapse
Oh, I thought that AutomateIt would work.
You may try other profile apps, such as Toggle Settings | Profiles.
There you can define different profiles, e.g. outdoor with wifi disabled and GPS enabled. And you can define some triggers on which the phone switches between the profiles.
There is a free Lite version in the Market. So just test it. And if it is good for you, there is a "full" version too.
Good luck!
itm said:
I'm looking for a way of automatically turning on GPS and data whenever I launch Google Navigation. I've tried Tasker but it doesn't allow toggling of GPS on the S2. I've also tried AutomateIT but this simply doesn't work - I created a rule to enable GPS when the Maps app was activated but whenever I launch Maps/Navigate it still tells me that GPS is disabled.
Can anyone recommend a good way of doing this?
Click to expand...
Click to collapse
I've tried AutomateIt and I was running into the same problem as you. What you have to remember is to make sure that the GPS toggle on your phone is set to 'enabled'. After you do this, set two different rules in AutomateIt for activating and deactivating GPS. It should work.

How do I disable Google Latitude Service?

I recently installed Semi V17 and an updated BetterBatteryStats version. With that combination, I noticed that my device was never able to move into deep sleep due to constant location updates, thus causing battery drain. I think I've narrowed down the culprit for my battery drain, however, I'm not sure I know how to resolve it. It appears to be the Latitude support in Google Maps. I'm not enrolled in Latitude, but based on "adb shell dumpsys" output, it appears that it is running and requesting location updates constantly. The following is the registration for location updates from dumpsys. Notice that it is specifying no minimum time or distance, which implies (to me) constant updates.
Code:
Receiver{419e7ad0 Listener [email protected]}mUpdateRecords: {passive=UpdateRecord{421e75a0 mProvider: passive mUid: 10084}}:
passive:
UpdateRecord{421e75a0 mProvider: passive mUid: 10084}
mProvider=passive mReceiver=Receiver{419e7ad0 Listener [email protected]}mUpdateRecords: {passive=UpdateRecord{421e75a0 mProvider: passive mUid: 10084}}
mMinTime=0 mMinDistance=0.0
mSingleShot=false
mUid=10084
Dumpsys identifies the 10084 process as the LocationFriendService:
Code:
*APP* UID 10084 ProcessRecord{41af23e8 13037:com.google.android.apps.maps:LocationFriendService/10084}
class=com.google.googlenav.android.AndroidGmmApplication
Does anyone have any idea how to disable this service without completely freezing/removing the Google Maps application?
Thanks,
Craig
Have you turned off automatic location detection in the Latitude/Maps settings? You can completely disable it or set so it asks you to update it manually.
Also if you have Facebook installed make sure you disable location reporting in your Facebook app settings. That was a big one for me.
One other thing to check is any widgets that use location detection (like weather widgets).
In settings... same place where you enable the GPS.
Strangely, I had to click through to enable Latitude before I could get to the settings to control Latitude and really shut it off. I've now turned off everything I could find related to Latitude and will see if that "sticks". Previously, it would seem to work for some period of time and then all of the sudden start running like crazy, so until I've run like this for at least 24 hours I'm just not going to know if I've truly managed to disable this service.
Next time, check here first.http://www.chucknorrisfacts.com/
Sent from my SAMSUNG-SGH-I777 using Tapatalk 2
csetera said:
Strangely, I had to click through to enable Latitude before I could get to the settings to control Latitude and really shut it off. I've now turned off everything I could find related to Latitude and will see if that "sticks". Previously, it would seem to work for some period of time and then all of the sudden start running like crazy, so until I've run like this for at least 24 hours I'm just not going to know if I've truly managed to disable this service.
Click to expand...
Click to collapse
It appears like disabling all things Latitude has cured my battery drain. If only they hadn't hidden those settings, it would have been way more obvious. Thanks for the tip.

Newbie question : What is the WIFI for?

I got a Stratos 2 a couple of weeks ago and I am exceedingly happy with it. One feature is the ability to connect the watch to a WIFI router. I have done that but still cannot figure out what that actually does.
Could someone shed a light on that for me?
Upload watch data to cloud. I sometimes have to do this so activities sync with MiFit.
On stock watches WiFi is only used to:
1. Upload sports activity data directly to the cloud;
2. Download firmware updates;
3. Send error report logs to Huami.
You can use third party apps to enable WiFi and keep screen on (WiFi disconnects if screen goes into standby mode), but battery will drain a LOT faster.

GPS issue when screen off

Anyone using smarthome devices that are using the geolocation of the phone to be triggered?
I have Phillips hue and Netatmo welcome and cannot see me when coming home except if my screen is opened and also open google maps and update manual my location.
Tried giving access to these apps not to sleep or use battery optimization but still nothing.
Anyone else?
I use a Tado system and I have noticed on the odd occasion it doesn't know I'm home with this phone, though setting the app to be exempt from throttling of data and exempt from power management seems to almost have resolved the issue.
Could you please share how to do that of throttling of data?
ooMoo said:
I use a Tado system and I have noticed on the odd occasion it doesn't know I'm home with this phone, though setting the app to be exempt from throttling of data and exempt from power management seems to almost have resolved the issue.
Click to expand...
Click to collapse
Has this been resolved by anyone?
I too have the Tado and it only updates my location when I open Maps and physically click on the blue dot to zoom in on my location or e.g. start navigating.
I've tried all the obvious like disable maps and tado battery optimisation, allow background data and what have you. On the Mate 10 pro this worked flawlessly btw so this has to be m20p related...
Together with the not too good curved screen (letters/graphics falling off), green tint, poor face and fingerprint recognition this is for me a reason to maybe get rid of this phone...
So you have already gone to:-
Battery settings, more battery settings, turn on "stay connected when device sleeps"
I use TADO with Mate20x AL00 and that fixed it for me.
Also make sure you have toggled the app power settings then it should be ok.
Hi, yes, 'stay connected when sleeps' is on.
What app power settings toggle do you mean, under special access, battery optimization?
In the meantime I've put Automate to work (https://play.google.com/store/apps/details?id=com.llamalab.automate&hl=en) and made this little flow that seems to be a good work around. Starting Tado in the last block is there now only to check if it works, nothing else.
Update: this is a workflow that works really well. Let me know if you want more info.
XDA is having issues uploading pics now, will attach it later
blackspp said:
XDA is having issues uploading pics now, will attach it later
Click to expand...
Click to collapse
The flow

amazfit stratos finish point problem

Hello, I have a problem with my stratos and I would like to know if anybody else has this problem or how to fix it.
When I finish my run and then sync with phone and open the app to check my run the finish flag on the map is not on the proper spot but 2-3km sooner.
For example, I run about 15 km but on 12th km, it sets finish flag but it continues to count distance, pace and so on further. In the app, it shows proper distance and everything seems ok but when I look on the map finish flag is on 12th km.
It seems like no issue at all but after uploading on Strava it cuts off everything after the finish flag, so it shows only those 12kms and nothing else. And this bothers me because I use Strava as my primary app to analyze my runs. Interesting is that no matter how long I run it always cuts off more or less the same distance around 2-3 km before the real finish.
I appreciate any help.
Go to Settings on wacth -> Activity reminders, set both to ON, save, then set both to OFF again (you must reset them).
If watch is running firmware > 2.3.7.0 then there is a bug when GPS signal is lost that didn't happen in the past. You may want to factory reset but do NOT restore old data to watch to reset all data, do the above again (also reset Activity reminders), make sure you get a strong GPS-fix before starting to record any activity. And to get better HR data, enable continuous HR for at least 24h and use the watch while you sleep to record resting rate.
lfom said:
Go to Settings on wacth -> Activity reminders, set both to ON, save, then set both to OFF again (you must reset them).
If watch is running firmware > 2.3.7.0 then there is a bug when GPS signal is lost that didn't happen in the past. You may want to factory reset but do NOT restore old data to watch to reset all data, do the above again (also reset Activity reminders), make sure you get a strong GPS-fix before starting to record any activity. And to get better HR data, enable continuous HR for at least 24h and use the watch while you sleep to record resting rate.
Click to expand...
Click to collapse
Thanks for the reply.
I tried reset activity reminders but it did happen again. The watches are running on 2.3.9.0 and this problem first time occurred on 7th January. Is it possible that some update came out around that date?
About the GPS when I get a green screen which indicated good GPS lock and I start the activity it shows always altitude like -20000m and it takes some time until altitude becomes accurate but I always wait on the same spot till it's ok. Could that be a problem? Should I wait to start tracking even though GPS is ready?
After factory reset can I upgrade the watches to the current version or I should stay on some older one?
Reseting data will only erase the activity data stored on watch, it won't affect firmware. I'd suggest that you do the procedure above, and also turn off the watch for about 15s to reset sensors. And find start to record the activity as soon as you get a green GO, wait a few seconds for a stronger GPS fix.
Hello, I have the same exact problem on Amazfit Pace. It happens on Cycling and Walk and always cut the last 1-2 km of the track before the arrive regardless of the length of the ride.
I would try the suggested solutions but I can't find Activity reminders on Pace.
Archenan said:
Hello, I have the same exact problem on Amazfit Pace. It happens on Cycling and Walk and always cut the last 1-2 km of the track before the arrive regardless of the length of the ride.
I would try the suggested solutions but I can't find Activity reminders on Pace.
Click to expand...
Click to collapse
On the Stratos Activity Reminders are found under Settings > General. Not sure if it will be the same on the Pace.
raubbbyy said:
Hello, I have a problem with my stratos and I would like to know if anybody else has this problem or how to fix it.
When I finish my run and then sync with phone and open the app to check my run the finish flag on the map is not on the proper spot but 2-3km sooner.
For example, I run about 15 km but on 12th km, it sets finish flag but it continues to count distance, pace and so on further. In the app, it shows proper distance and everything seems ok but when I look on the map finish flag is on 12th km.
It seems like no issue at all but after uploading on Strava it cuts off everything after the finish flag, so it shows only those 12kms and nothing else. And this bothers me because I use Strava as my primary app to analyze my runs. Interesting is that no matter how long I run it always cuts off more or less the same distance around 2-3 km before the real finish.
I appreciate any help.
Click to expand...
Click to collapse
Amazfit ended up replacing my watch for this issue. None of the fixes they suggested worked. If they are hesitant to replace the watch, remind them of the Satisfaction Guarantee slip included in the package when you purchased the watch.
I have the same problem on my Amazfit pace... So annoying!
Has anyone found a fix?
d0d091 said:
I have the same problem on my Amazfit pace... So annoying!
Has anyone found a fix?
Click to expand...
Click to collapse
Hello, I have the same kind of problem.
My watch : Amazfit Pace 2.8.5.0
It happens only when the run is more than 15km
The finish flag is about 1.5 km to short.
The total distance is ok on Zepp App but it is not good in Strava.
1
Does anyone has a fix?
did you ever tryed a climb and see what the altitude map shows you?
I think my issue (https://forum.xda-developers.com/t/...os-3-2020-12-03.4033223/page-25#post-84231665) is because of that...
butcher33 said:
did you ever tryed a climb and see what the altitude map shows you?
I think my issue (https://forum.xda-developers.com/t/...os-3-2020-12-03.4033223/page-25#post-84231665) is because of that...
Click to expand...
Click to collapse
Hi.
First sorry for my english.
I have same issue. Zepp is the problem. GPX data from watch is ok. When it is updated to Zepp, data is ok.
But when you download the .gpx from Zepp (like Strava should), the latest data is missing in the .gpx
I opened a ticket at Amazfit but for them everything is fine.
In the screenshot below, we see on the left my watch's .gpx on the left and Zepp's .gpx on the right. There are 30 seconds of data missing.

Categories

Resources