Sony SmartWatch 3 NFC Support Package - Sony Smartwatch 3

So, after a considerable amount of time I finally managed to properly start the NFC module in SW3. It can do all things a module on your phone can do, however, it causes elevated battery usage while doing so.
Warnings:
This package is for build LCA43 only (can be seen in Settings->About)
Can screw up boot if you install this on a different build and/or customized system
Future OTA updates can also corrupt your sytem. Restore to a stock ROM before installing them.
Make backups of system and boot partitions before installing
Uses insecure kernel (with SElinux disabled) and disables signature checks in services.jar
Preview/development purposes only, it disables initial tag (used for quick pairing) and causes moderate power consumption when NFC is active and screen is turned on.
Technical details:
Currently this is more of a proof-of-concept work and security was a big problem when developing. NfcService requires several permissions declared as system|signed which means it has to be signed with the same certificates used to sign the remaining system. I did not manage to do that, so I patched services.jar to ignore bad certificates.
(This paragraph is deprecated) When device boots even if NFC adapter is active, it does not get full power right away. Instead, it sets up a BroadcastReceiver to catch ACTION_SCREEN_ON and ACTION_SCREEN_OFF events to power the module only when screen is lit. However, power manager service on SmartWatch 3 never sends these broadcasts, so the module never gets a signal to turn on. I am yet to figure out why, in the meantime I patched NfcService to turn the module regardless of current screen state. It does not start consuming power until a tag is first detected, after which the battery can be drained with rate up to 50% per hour.
Features:
Full NFC support (tag reading, writing, HCE (card emulation) and P2P (Android Beam))
Configuration app to turn NFC module on and off
Watchface to monitor current NFC module state
The package does not include apps to read and write tags, emulate cards and use Android Beam.
Instaling:
If you need to omit certain components (like watchface), feel free to remove them from the package files
Boot into recovery (I am using TWRP found here)
Back up your system and boot partitions in case something goes wrong or you want to remove the package
Push the package using adb:
Code:
adb push nfc.zip /sdcard/nfc.zip
Tap "Install" on the screen
Locate nfc.zip
Install it
Boot into system
Uninstalling:
Restore system and boot partitions from your backup
Usage:
You can control your NFC module using NFC Configuration app
If you want to monitor NFC module state all the time, use NFC Status watchface (long tap on the screen to set up)
To view a tag install tag editing app via adb
Example code to check NFC:
Code:
NfcManager nfcManager = (NfcManager)this.getBaseContext().getSystemService(Context.NFC_SERVICE);
NfcAdapter nfcAdapter = nfcManager.getDefaultAdapter();
boolean isAdapterEnabled = (nfcAdapter != null) && nfcAdapter.isEnabled();
Changes:
08.10.2015 0.2 Fixed constant battery drain. Reduced tag polling rate.
07.10.2015 First release
Thanks:
crpalmer for his kernel build configs
Michael Roland for his article on NFC support in SW3
Cyanogenmod team (CM was used to build NFC binaries)

OMG I can't believe someone actually did this. Can't wait to get home to try it.
Question though: You said it is causes severe power consumption. I assume this is only when NFC is on all the time (even when device is in ambient mode)? Can NFC be set to run only when device is fully on?

Question though: You said it is causes severe power consumption. I assume this is only when NFC is on all the time (even when device is in ambient mode)? Can NFC be set to run only when device is fully on?
Click to expand...
Click to collapse
Yes, it does so only when the service is turned on in the settings. More specifically, when you turn it on, power consumption (and heat) raise a little bit, but not dramatically. That is until you bring a tag nearby which causes a lot of heat and battery drain. If you turn the service off, however, the watch goes back to normal (no need to reboot).
Can NFC be set to run only when device is fully on?
Click to expand...
Click to collapse
I think so. I am currently working on a solution, which will most likely be finding a way to broadcast ACTION_SCREEN_* messages.

So if I understand correctly, drain will not stop after you remove the watch from the tag? How about polling for connectivity every second or so and if tag is detached, automatically restart the NFC radio?
---------- Post added at 03:09 PM ---------- Previous post was at 02:26 PM ----------
Regarding ambient mode, you can register this receiver to receive status of screen going from/to ambient mode:
Code:
<uses-permission android:name="com.google.android.wearable.permission.RECEIVE_AMBIENT_DREAM_STATE" />
...
<intent-filter>
<action android:name="com.google.android.wearable.action.AMBIENT_STARTED" />
</intent-filter>
<intent-filter>
<action android:name="com.google.android.wearable.action.AMBIENT_STOPPED" />
</intent-filter>
RECEIVE_AMBIENT_DREAM_STATE is system permission though, so it needs to be handled by service installed on /system partition.

Thanks, this is great! I'll try and modify NfcService tomorrow to catch these along ACTION_SCREEN. Permissions shouldn't be a problem, the service is run as system anyway.

This is fantastic news! Thanks for all your hard work and I look forward to trying out builds.

Good news!
I have uploaded a new package; NFC no longer drains battery when the screen is in ambient mode (it is now normal 1-3% per hour compared to previous 50%). Thanks matejdro for pointing out required permissions!
I have also slightly decreased tag polling rate. This causes a slight delay when reading a tag, but reduces produced heat when watch screen is on.

I just released small utility that triggers intents on the phone when watch detects a tag: http://forum.xda-developers.com/sma...tagrelay-automate-life-scanning-tags-t3222332 . Been using it for some time now and it works great!
Two remarks:
I noticed watch tends to reboot itself occasionally. Most often it happens when trying to scan a tag, but sometimes it also happens randomly when I'm nowhere near a tag and watch is not even active. Not completely sure if this is your mod (it might be something else with my setup), but I don't recall it ever happening before I installed it.
I recommend you add small subtle vibe when tag is detected. I'm using 75ms on above mentioned utility which works well but it would be better if this was integarted into the NFC service as pretty much any use case would need user to know when tag is scanned and when can you lift your arm back up.

What about sources of your version of kernel?

how can i config the hce?

So will enabling the NFC chip allow it to interact with an app on your phone?. For example I have an app on my phone for home automation. From the app I can turn lights on and off. I can assign an NFC tag to an action in the app. So I walk in a room, tap my phone to the tag and the app turns on the light. It would be great if I could get the same result by tapping my SmartWatch to the tag.

Is there any way to use HCE then, if there's full NEC support? I love the fact you've managed to do this, but now I've installed the package I've not really got anything to apply this great leap forward to. I'm not experienced with Android coding, but I know a few people who have some experience. Is there anything you can tell me beforehand? We're after trying to emulate our college ID cards which use NFC, and they only use the UID to open doors, it would seem.

wserfer said:
What about sources of your version of kernel?
Click to expand...
Click to collapse
I have used build configs by crpalmer along with these sources. The only difference in config is that I completely disabled SElinux. I have attached my config and diff below.
View attachment kernel_config.tar.gz
flo_lang_ said:
how can i config the hce?
Click to expand...
Click to collapse
Chris_Jones_7 said:
Is there any way to use HCE then, if there's full NEC support? I love the fact you've managed to do this, but now I've installed the package I've not really got anything to apply this great leap forward to. I'm not experienced with Android coding, but I know a few people who have some experience. Is there anything you can tell me beforehand? We're after trying to emulate our college ID cards which use NFC, and they only use the UID to open doors, it would seem.
Click to expand...
Click to collapse
The chip does have HCE (since stock firmware uses an application to write Bluetooth pairing tag at boot). It also should support HCE for Java apps, however, I didn't do any tests on that, so I can't tell if it will start out-of-the box. As for configuring it, I was planning to post updated config app later this month.
KewlRobD said:
So will enabling the NFC chip allow it to interact with an app on your phone?. For example I have an app on my phone for home automation. From the app I can turn lights on and off. I can assign an NFC tag to an action in the app. So I walk in a room, tap my phone to the tag and the app turns on the light. It would be great if I could get the same result by tapping my SmartWatch to the tag.
Click to expand...
Click to collapse
If I got it right, what you are suggesting is an app that can use NFC on your watch as a remote sensor while main functions work on your phone; I am not aware of any apps that can do that. You could try installing phone app on SW via adb.

This only works with Mifare Ultralight?

Any ideas where I can see this watch in store in USA?
What the title says. I wanted to get a feel of the watch before spending $250.

anandr165 said:
What the title says. I wanted to get a feel of the watch before spending $250.
Click to expand...
Click to collapse
iirc verizon was selling them. may call and check first

venelar said:
iirc verizon was selling them. may call and check first
Click to expand...
Click to collapse
Out of stock online atleast.

Please help me!
I've installed NCF support package and app. Can I scan NFC Pass-card to this watch and use only watch to pass against card?

will you still be updating this ebones?
ebones said:
As for configuring it, I was planning to post updated config app later this month.
Click to expand...
Click to collapse

Does this kernel fix
Mr @ebones
Does this kernel include @crpalmer fixes for random battery drain?
If not, is it possible to combine the two?

Related

Workaround for Wifi Performance when Screen is off

Hey,
There was a change in API 12 (Honeycomb and later) with the way "wifi lock" is handled. Even if the sleep policy in settings->wifi->advanced->"Keep wifi on during sleep" is set to "always", wifi will still be in a "low performance mode". This results in throttled speed (f.e: stuttering streaming), high latency (ping your phone) and can even cause disconnects, when the screen is off.
Still this is not bug but a feature of Android and should be addressed by any app that needs full wifi performance. Any app that needs full wifi performance (like streaming or file shearing over wifi) should call for "WIFI_MODE_FULL_HIGH_PERF". This can be found in the official "android developer reference". Before API 12 (honeycomb) an app just needed to call WIFI_MODE_FULL for "wifi lock". If an app isn't coded proberly for honeycomb and ICS and has issue with Wifi performance appart from calling "wifi wake lock", you should report that to the developer of that app.
I still found a simple workaround for scenarious in which this function is not properly called. There is an rather simple widget on google play called "WIFI High Performance Widget". If the widget is enabled, the function WIFI_MODE_FULL_HIGH_PERF is called and the wifi performance is on full speed even when the screen is off. Im not in any way involved in the developement of this app and there might be other apps out there, that could achieve the same (for example: Android Terminal emulator also calls WIFI_MODE_FULL_HIGH_PERF if "wifi lock" is enabled.) Still this widget is the simplest solution i found thus far. Just enable the widget and get full wifi performance when screen is off.
Greetings
melethron
Thank you very much mate it's really cool app successful on my GN
Nice post OP, wish there was more like this more often .
Just wanted to add that Franco's kernel (and app) has a Wifi toggle that does this also.
So will that API eventually be deprecated at some point in the future? That's the way I interpreted it which stinks meaning at some point this trick won't work...?
Thanks a lot! I was afraid that my phone was defective. I must say I'm a little disapointed with google. Theres an open case for this for months over at code.google.com issue 26654. Nobody from google has bothered answering this.
Maybe you should pop over and enlighten them?
Btw. Same with the bluetooth play/pause function. Google changed the code in ics and obviously are not able to communicate this in a clear way to the developers. Thought that was a hw fault too...
That was the last possible hw issue for me. Now i'm ready to unlock without fear of having to return it for service.
Sent from my Galaxy Nexus using Tapatalk 2
I doubt they will ever remove this new feature
RogerPodacter said:
So will that API eventually be deprecated at some point in the future? That's the way I interpreted it which stinks meaning at some point this trick won't work...?
Click to expand...
Click to collapse
I doubt that they will change this. To have 2 "wifi lock" modes is feature and not a bug. And think it's a good feature.
Providing low performance Wifi functionally is enough in most cases. For example an establieshed IMAP IDLE connection (push email) doesn't need full performance Wifi. Also other apps that get push notification (Whatsapp, facebook, google+ etc.) don't need full performance. Those 40 kb/s i get on low performance mode is way enough for all those background syncs and push stugg and any way to save Power is a good feature for those powerdraining smartphones.
If an app now needs more Performance it should make use of the WIFI_MODE_FULL_HIGH_PERF funtcion. To avoid disconnects by sleep policy, an app had to call WIFI_MODE_FULL before anyway. If the app needs more speed for some streaming, file transfer etc. it just needs to call WIFI_MODE_FULL_HIGH_PERF while its running.
Its not Google that should change anything in the way this is handled now. Its the App Developer that should do that. The SDK documentation is pretty good and although i'm not a programmer myself it didn't take long for me to find out where the issue with stuttering streams or slow file transfer lies. Since i had this issue with "Samba filesharing" i wrote a bug report to the dev and i hope this issue will be fixed soon, making this workaround obsolute. Samba filesharing already has the options to call "wifi look" and the code that needs to be changed is just some lines. If this is fixed, wifi will only be in high_perf mode, when im connected to the AP at home and power will be saved, when im out of range of the AP.
Anyone that has issue with an app, that needs full performance should actually file a bugreport and give the developer a hint by linking to the official android SDK documentation about HIGH_PERF mode. All they need to do then is replace code like:
Code:
int wifiLockMode = WifiManager.WIFI_MODE_FULL;
... which should already be present in any app that needs wifi, when screen is off, by something like that:
Code:
int wifiLockMode = WifiManager.WIFI_MODE_FULL;
if (AndroidCompat.SDK >= 12) {
wifiLockMode = WIFI_MODE_FULL_HIGH_PERF;
}
(don't rely on that code, thats just a guess from looking at the code from "Android terminal emulator" which does wifi lock "properly" for newer android versions)
This way is fully compatible with Android 1.5 - 3.0 for old "wifi lock" and also compatible with any Version newer than 3.1. that has support for newer powersaving Wifi Hardware.
So actually the only thing that google might change, may be some Kernel adjustments of the low perf mode itself, for issues with disconnects (due to some large overhead by wifi securty protocols etc). But actually i don't know if this is really some Kernel stuff or done by the Wifi hardware itself.
The reason i doubt, that google won't change anything on this function introduced in SDK API 12, is that the SDK should assure downward compatibility. Compatibility of an app with new features from NEWER versions of Android is up to the developers of an app, and not the job of google.
Great explanation and the workaround works for me. We need more posts like this around.
I'm surprised more apps aren't using this that require it such as audio streaming apps etc...
RogerPodacter said:
I'm surprised more apps aren't using this that require it such as audio streaming apps etc...
Click to expand...
Click to collapse
Yeah, like Google's own built in SIP client for voip, which has been known to suffer from issues when the screen is turned off.
Sent from my Galaxy Nexus using Tapatalk 2
Now, the million dollar question... how does this affect battery life?
Sent from my Galaxy Nexus using Tapatalk 2
EP2008 said:
Now, the million dollar question... how does this affect battery life?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
I couldn't check this yet. On my old phone (HTC desire) the battery "driver" showed the current (mA) with dmesg. This was a great way to check the effects of stuff like undervolting (which is pretty useless -> see here.)
Since i only get the mAh and mV Values on dmesg i installed a battey app, which calculates the consumption based on the changes of the mAh values. I got that app running over night with wifi lock in low perf mode. I switched the widget on some minutes ago and let my phone run in idle mode. Ill report about the values meassured later.
From what ive read about power saving mode, is, that is very effective and wifi on low perf mode is pretty close to wifi switched off. Well, we'll see...
RogerPodacter said:
I'm surprised more apps aren't using this that require it such as audio streaming apps etc...
Click to expand...
Click to collapse
Actually its not that bad if most devs don't know. Careless use of those function causes an unnecessary power drain (see also this article). On a phone with real multitasking (not like this apple ****) every single app can call stuff like wifi lock (if the app gets the permission on install - most users don't even read them). I checked the reference page about wifi lock itself and those options arent mentioned there. I guess they do it for a reason. A "good dev" will found out by reading the complete documentation about wifi manager and a "bad dev" wont use that function unnecessary if it is not needed.
I'll check how well this power saving mode works, but i think it will have a noticeable effect. Its good that the high perf mode is a bit hidden in the documentation. That way the efforts to save power wont be prevented by poorly coded apps.
EP2008 said:
Now, the million dollar question... how does this affect battery life?
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
Ok after a quick test, the effect is quite noticeable. With quite some background stuff running and Wifi on "low performance" the battery drops around 1,5% per hour. Same stuff running but with "high performance" mode i get about 2% per hour.
But there where quite some "fluctuations". Even on High Performance mode i had a drop of only 0,7% per hour for half an hour. This was also the lowest value in low Performance mode. There are many coefficients (apps syncing etc) adding to battery consumption. To get a good calculation of the actual values one has to gather a large amount of data, and has to "averaging out" those other coefficients.
On my average usage behaviour my battery holds at least for a day and i plug my phone in in the evening. So this doesn't really concern me. But if someone is a "power saving enthusiast" he should definitely only switch "high performance" mode on, if he absolutly needs it. Although the real difference between the modes is surely lower than my estimated 0,5% per hour there is a noticeable effect to be found for sure, if examined "properly".
BTW: I wrote to the dev of that Power widget, if he can implement the feature to switch off "high perf" mode automatically, if the phone has no connection to an AP. He already thought about this, and even plans to include some kind of "white list" so that "high perf" mode is only enabled if the phone is connected to some predefined AP. I'd appreciate this, since i only need that mode when i'm at home, when i have "samba filesharing" running on my phone.
melethron said:
BTW: I wrote to the dev of that Power widget, if he can implement the feature to switch off "high perf" mode automatically, if the phone has no connection to an AP. He already thought about this, and even plans to include some kind of "white list" so that "high perf" mode is only enabled if the phone is connected to some predefined AP. I'd appreciate this, since i only need that mode when i'm at home, when i have "samba filesharing" running on my phone.
Click to expand...
Click to collapse
I tried to automate the widget to turn on only when a call comes in so it can maintain a strong connection for voip, but the app I used, Llama, won't allow you trigger widgets, just apps or shortcuts.
I really only need performance mode for voip.
Sent from my Galaxy Nexus using Tapatalk 2
EP2008 said:
I tried to automate the widget to turn on only when a call comes in so it can maintain a strong connection for voip, but the app I used, Llama, won't allow you trigger widgets, just apps or shortcuts.
I really only need performance mode for voip.
Sent from my Galaxy Nexus using Tapatalk 2
Click to expand...
Click to collapse
You should write to dev off the VOIP app.
I dont know a way to do enable High_perf through console or script and i cant code an app for that. Anyway this would be no real solutions anyway, but only workarounds. The VOIP app should be fixed.
melethron said:
You should write to dev off the VOIP app.
I dont know a way to do enable High_perf through console or script and i cant code an app for that. Anyway this would be no real solutions anyway, but only workarounds. The VOIP app should be fixed.
Click to expand...
Click to collapse
Several VoIP apps have the feature built in, but I find them to be very combersom and unreliable. I'm using the stock sip client and although it's reliable, it offers no settings for tweaking anything.
EP2008 said:
Several VoIP apps have the feature built in, but I find them to be very combersom and unreliable. I'm using the stock sip client and although it's reliable, it offers no settings for tweaking anything.
Click to expand...
Click to collapse
Now that is strange, because from what i see from the Android source the build in SIP does use the FULL_PERF lock on calls by default. See here
When audio is establieshed on a call it does:
Code:
if (isWifiOn()) grabWifiHighPerfLock();.
So if wifi is on while a call is established it does:
Code:
private void grabWifiHighPerfLock() {
if (mWifiHighPerfLock == null) {
Log.v(TAG, "acquire wifi high perf lock");
mWifiHighPerfLock = ((WifiManager)
mContext.getSystemService(Context.WIFI_SERVICE))
.createWifiLock(WifiManager.[COLOR="Red"]WIFI_MODE_FULL_HIGH_PERF[/COLOR], TAG);
[COLOR="Red"] mWifiHighPerfLock.acquire[/COLOR]();
}
}
Which sets wifi in High perf mode as it should and is disabled after the call:
Code:
private void [More ...] stopCall(boolean releaseSocket) {
Log.d(TAG, "stop audiocall");
[COLOR="Red"]releaseWifiHighPerfLock[/COLOR]();
Are you sure the widget did change anything in the behaviour. Stuttering could have other reasons like poor connection or something. From what i see the widget shouldnt do anything that the build in SIP doesnt already.
melethron said:
Now that is strange, because from what i see from the Android source the build in SIP does use the FULL_PERF lock on calls by default. See here
When audio is establieshed on a call it does:
Code:
if (isWifiOn()) grabWifiHighPerfLock();.
So if wifi is on while a call is established it does:
Code:
private void grabWifiHighPerfLock() {
if (mWifiHighPerfLock == null) {
Log.v(TAG, "acquire wifi high perf lock");
mWifiHighPerfLock = ((WifiManager)
mContext.getSystemService(Context.WIFI_SERVICE))
.createWifiLock(WifiManager.[COLOR="Red"]WIFI_MODE_FULL_HIGH_PERF[/COLOR], TAG);
[COLOR="Red"] mWifiHighPerfLock.acquire[/COLOR]();
}
}
Which sets wifi in High perf mode as it should and is disabled after the call:
Code:
private void [More ...] stopCall(boolean releaseSocket) {
Log.d(TAG, "stop audiocall");
[COLOR="Red"]releaseWifiHighPerfLock[/COLOR]();
Are you sure the widget did change anything in the behaviour. Stuttering could have other reasons like poor connection or something. From what i see the widget shouldnt do anything that the build in SIP doesnt already.
Click to expand...
Click to collapse
I haven't been on too many calls today, but it is a known problem that VoIP quality goes to hell when the screen is off and I've experienced the problem several times with the built-in sip. If it's already going into high perf mode, it's not doing right. LOL
EP2008 said:
I haven't been on too many calls today, but it is a known problem that VoIP quality goes to hell when the screen is off and I've experienced the problem several times with the built-in sip. If it's already going into high perf mode, it's not doing right. LOL
Click to expand...
Click to collapse
FWIW, I haven’t experienced these issues—and all I do is VoIP calls because I get poor cellular signal in my apartment.
EP2008 said:
I haven't been on too many calls today, but it is a known problem that VoIP quality goes to hell when the screen is off and I've experienced the problem several times with the built-in sip. If it's already going into high perf mode, it's not doing right. LOL
Click to expand...
Click to collapse
Well if it is not Wifi it could still be a different power management issue. For example one cpu of the 2 cpus is most likely off while screen is off. To avoid this devs can use "wake lock" which is pretty similar to wifi lock. (See android power management). You could try any app that can enable "wake lock". I know that Terminal Emulator does use PARTIAL_WAKE_LOCK which should be just what you need. You can use that app to test it. Just use "take wake lock" from the menu and let the app running. But be warned, this will effect power consumption. So just use that to try.
melethron said:
Well if it is not Wifi it could still be a different power management issue. For example one cpu of the 2 cpus is most likely off while screen is off. To avoid this devs can use "wake lock" which is pretty similar to wifi lock. (See android power management). You could try any app that can enable "wake lock". I know that Terminal Emulator does use PARTIAL_WAKE_LOCK which should be just what you need. You can use that app to test it. Just use "take wake lock" from the menu and let the app running. But be warned, this will effect power consumption. So just use that to try.
Click to expand...
Click to collapse
You could be right. I'm assuming it's the wifi going into low power mode when the screen is off, but it could be the CPUs just clocking down or shutting off altogether.
---------- Post added at 04:28 PM ---------- Previous post was at 04:19 PM ----------
BinkXDA said:
FWIW, I haven’t experienced these issues—and all I do is VoIP calls because I get poor cellular signal in my apartment.
Click to expand...
Click to collapse
Have a look at the troubleshooting section in this VoIP thread. I'm not sure what causes it for some and not others... Maybe custom ROMS? Kernels?
http://forum.xda-developers.com/showthread.php?t=1583120

[Q] NFC vs Tasker

I upgraded my phone from Inspire to S3 . I just setup google wallet using the sticky thread. But I am just not yet convinced to use NFC tags as compared to Tasker for automated tasks.
Can someone shed a light on where/if NFC tags are better than Tasker?
Few NFC uses could be
1) In car where you turn on BT, Brightness 100% , Start music
2) On the toilet where you can start your favorite game
3) Near main door where you can turn on Wifi( similar to Tasker location)
Bump
Sent from my SAMSUNG-SGH-I747 using xda premium
IIRC, you can use NFC tags WITH Tasker, which makes sense.
EDIT: and google says...
Beginners Guide to Android Tasker | Part 1 of 3
Well I am using Tasker since a year and love it but would like to know advantages of NFC over Tasker.
eg. I can turn on Wifi based on location instead of tagging using NFC.
metaldood said:
Well I am using Tasker since a year and love it but would like to know advantages of NFC over Tasker.
eg. I can turn on Wifi based on location instead of tagging using NFC.
Click to expand...
Click to collapse
I think you're just needlessly confusing yourself.
Think of an NFC tag as just yet another EVENT that can trigger an ACTION.
Instead of having your course-grained GPS location turn WiFi back on at home, for example, you could have an NFC tag do it when you swipe it at the door, and another tag in your car dock to turn WiFi off, carmode on, navigation on, etc. This probably isn't the best example.
i use nfc task launcher.. most powerfull one i could find works fine.
samsung one is limited.
when getting in car i have a toggle tag.
first scan
turns off wifi
turns on bluetooth
starts audbile app
sets ringer and media volume to max
sets brightness to auto
next scan for getting home
sets bluetooth off
vols. to max
brightness to dim
wifi on.
etc. etc.
lgkahn said:
i use nfc task launcher.. most powerfull one i could find works fine.
samsung one is limited.
when getting in car i have a toggle tag.
first scan
turns off wifi
turns on bluetooth
starts audbile app
sets ringer and media volume to max
sets brightness to auto
next scan for getting home
sets bluetooth off
vols. to max
brightness to dim
wifi on.
etc. etc.
Click to expand...
Click to collapse
I used NFC Task Launcher as well... but got rid of it because I found myself barely ever using it... but it is probably the best one.
ndn_enigma said:
I used NFC Task Launcher as well... but got rid of it because I found myself barely ever using it... but it is probably the best one.
Click to expand...
Click to collapse
Forgive me PLEASE for what I'm about to ask, but . . . Why would someone pay for nfc tags and then program them, instead of using Tasker? I guess what i'm asking is, what's the main difference between nfc tags and apps like Tasker and Llama? Is it so you can transfer the programmed info that's on the tags to other nfc-enabled phones? I've read and googled, but don't quite understand the advantages of tags and tectiles over free apps. Can someone please draw it out in crayon for me? Not being a smart-ass, I honestly can't connect the dots
Well, for one thing, I don't necessarily want to perform all those tasks everytime I get in the car. If I'm just running to the store down the street I don't really care about turning off wifi, starting bluetooth, changing volumes, launching apps, etc. I typically only do that if I'm going to be in the car for a while. With an NFC tag I can swipe it if I want all that stuff otherwise I don't bother. As smart as Tasker is, it can't read my mind so it's going to do that stuff every time.
aicirt17 said:
Forgive me PLEASE for what I'm about to ask, but . . . Why would someone pay for nfc tags and then program them, instead of using Tasker? I guess what i'm asking is, what's the main difference between nfc tags and apps like Tasker and Llama? Is it so you can transfer the programmed info that's on the tags to other nfc-enabled phones? I've read and googled, but don't quite understand the advantages of tags and tectiles over free apps. Can someone please draw it out in crayon for me? Not being a smart-ass, I honestly can't connect the dots
Click to expand...
Click to collapse
I read the big advantage is to let tasker unlock the phone when near an NFC tag and then run programs from there.
I can't find the thread this morning but will look for it again.
Do don't use Tasker but if it is the only one that can do this, I will get it off the Appstore and some tags.
BTW- which tags are you guys suggesting works the best?
aicirt17 said:
Forgive me PLEASE for what I'm about to ask, but . . . Why would someone pay for nfc tags and then program them, instead of using Tasker? I guess what i'm asking is, what's the main difference between nfc tags and apps like Tasker and Llama? Is it so you can transfer the programmed info that's on the tags to other nfc-enabled phones? I've read and googled, but don't quite understand the advantages of tags and tectiles over free apps. Can someone please draw it out in crayon for me? Not being a smart-ass, I honestly can't connect the dots
Click to expand...
Click to collapse
Probably because you can use NFC tags when you WANT them to be used (as someone else mentioned.... don't necessarily HAVE to have your favorite internet radio station playing through Bluetooth in your car if you're only driving 5 minutes away to get some groceries).... and they don't really affect battery life since it's not constantly checking your location through GPS or scanning for WiFi signals.
One of my tasker profiles is to go into airplane mode at work, based on sensing a wifi network we have. I work on 30th floor, surrounded by data center and shielding, etc and we have 0 cell signal, so the phone just sits there searching for signal and it kills the battery otherwise. When I leave for lunch, it no longer sees the wifi and turns signal back on, and turns it off when I come back, and same for when I leave for the day.
However, it doesn't *always* work as expected (admittedly my weak tasker skills might play a part here lol). So I was thinking about pickup up a tag, easy just have it at my desk, go into airplane mode at work, out of airplane mode when I leave.
Another option is to just use time based triggers, but I'm not always at the same office, and I'm not always going to lunch at the same time, etc so static time rules would'nt work that well.
EDIT - reply to this made me look at the profile, and I might have better success by turning specific parts off (cell, BT, etc) vs just going into full airplane mode. I'll give that a try. Still, seems like a tag would be uber simple lol.
scoobmd said:
I read the big advantage is to let tasker unlock the phone when near an NFC tag and then run programs from there.
I can't find the thread this morning but will look for it again.
Do don't use Tasker but if it is the only one that can do this, I will get it off the Appstore and some tags.
BTW- which tags are you guys suggesting works the best?
Click to expand...
Click to collapse
BUMP
The easiest way that I have found to look at is an NFC tag is a programmable switch and it only works when I choose to use the switch. Tasker when running on the other hand will perform actions based on conditions once programmed, the conditions act as the switch, if the conditions are met the switch is activated whether or not I want it to run or not. Both can be used in combination. For instance you may want to program an NFC tag to control whether or not Tasker is active in certain situations.

Battery optimization

What exactly does that feature do on an individual app? Security apps like cerberus recommend not using it.
Sent from my Nexus 5X using Tapatalk
Hi
km8j said:
What exactly does that feature do on an individual app? Security apps like cerberus recommend not using it.
Sent from my Nexus 5X using Tapatalk
Click to expand...
Click to collapse
During Doze mode (this kicks in when you've not moved or used the phone for a period of time, such as overnight when it's left alone) stops apps from waking the phone or running background tasks, the idea being if the phone isn't being used, it's a waste of power for apps to keep going off on line chattering or receiving notifications and displaying them to the user. Notifications that you might have got immediately, don't ping through until you press the power button the next morning.
I suspect security apps like Cerberus don't want to partake in Doze mode as they want to wake your phone up every few hours regardless and scan it, or be able to download new signatures any time.
Despite setting an app to not be optimised, it still gets stop from waking the phone using alarms during Doze (alarms are something an app can set to say wake the phone up and run the app every 10 minutes or on the hour etc). However the developer of the app can work around this by setting a new type of alarm, for Google this work around is easily detected and it wouldn't surprise me if they start alerting on the Play store about apps that are potential battery drains because they by-pass Doze. Of course some apps have to, for example an alarm clock to wake you in the morning, or something like Tasker that you set to run things at specific times, so it will be up to the developer to explain why and the person downloading to make a decision about it.
Regards
Phil
Hi
PhilipL said:
However the developer of the app can work around this by setting a new type of alarm, for Google this work around is easily detected and it wouldn't surprise me if they start alerting on the Play store about apps that are potential battery drains because they by-pass Doze. Of course some apps have to, for example an alarm clock to wake you in the morning, or something like Tasker that you set to run things at specific times, so it will be up to the developer to explain why and the person downloading to make a decision about it.
Click to expand...
Click to collapse
That was my post in October, this happened to Tasker: http://www.androidpolice.com/2015/1...y-reasons-this-time-its-the-notorious-tasker/
It seems Google has perhaps pulled the plug on Tasker a bit too quickly due to a BETA version, but I think overall this approach is good for Android if it gets rid of battery draining apps, which usually are up to no good downloading ads or sending back data for marketing reasons. Obviously some apps are the exception to this like Tasker, which will need this exception to continue working correctly, as otherwise it will be restricted to one wake-up every 15 minutes only when the phone goes into doze mode.
Regards
Phil
PhilipL said:
Hi
That was my post in October, this happened to Tasker: http://www.androidpolice.com/2015/1...y-reasons-this-time-its-the-notorious-tasker/
It seems Google has perhaps pulled the plug on Tasker a bit too quickly due to a BETA version, but I think overall this approach is good for Android if it gets rid of battery draining apps, which usually are up to no good downloading ads or sending back data for marketing reasons. Obviously some apps are the exception to this like Tasker, which will need this exception to continue working correctly, as otherwise it will be restricted to one wake-up every 15 minutes only when the phone goes into doze mode.
Regards
Phil
Click to expand...
Click to collapse
Interesting reading. The question is why they even allow apps to use permission for ignoring doze, whe it most liley means ban in Play Store. Should be available to system apps only.
Note: Google Play policies prohibit apps from requesting
direct exemption from Power Management features in Android 6.0+ (Doze and App
Standby) unless the core function of the app is adversely affected.
Click to expand...
Click to collapse
Now the question is what authority can JUDGE whether certain app needs it or not.

Doze in accessibility? What's that?

Wandering in my LG G4 settings I was in "accessibility" options and I found at the bottom of the screen the "doze" option. What's that?
Which version of Android are your phone running? Mine is running Marshmallow and there is no "Doze" option found in "Accessibility".
Maybe it's a fake application from playstore.
Because Marshmallow versions have a new feature called Doze.
Android Marshmallow has changes deep in the operating system that can allow your phone (or tablet) to get better battery life. We see this mentioned with every operating system update from every company that makes smart devices, but this time they mean it.
Enter Doze. If the name reminds you of a pleasant nap while nothing pressing is going on, you've figured out what it is. It's a set of changes and rules that will put your phone to sleep when it's idle, which means you're not using as much of that precious juice from your battery. It sounds simple (and it is) but there are a few things to know.
You won't have to do anything to use the new Doze feature. There are no switches or settings you need to toggle, and once you've updated to Marshmallow it just works. That is, when it's supposed to work.
And that's the thing. You won't see any benefit from Doze while your phone is in your pocket and you're working or at school. Things need to be idle, and that means really idle.
For Doze to kick in, your phone needs to be sitting still with the screen off, and not connected to a charger. That means no moving around and nudging the gyro or other motion sensors, no touching the screen or the buttons and no waving your hand around in front of it if you're using a phone like the new phones from Motorola that have motion detection on the front bezel. Set it down, and leave it alone.
After a while, everything goes to sleep. Well, almost everything. You'll still get notified when "high-priority" apps need your attention. That means things like phone calls or SMS messages can get through (and thus waking up your dozing phone) as well as any app that declares itself as high-priority. Other things, like email notifications or Clash of Clans telling you your gold mine has leveled up aren't going to come in and wake your phone up.
And yes, this sounds like there is potential for abuse by developers who want to declare their app as high-priority. But Google has thought of this, and has a pretty good way to curtail any devious developers — high-priority notifications that aren't part of your carrier network (calls and texts) have to come through a Google Cloud Messaging server. When they find someone abusing the system, and subsequently keeping your phone from dozing as intended, they can take action. We assume this means those notifications can no longer come through as high-prioity, but we also hope there is tar and feathers involved.
Sent from my Lenovo A7010a48 using XDA-Developers mobile app
I also noticed the feature right at the bottom of accessibility?
Celi911 said:
I also noticed the feature right at the bottom of accessibility?
Click to expand...
Click to collapse
Friends no idea what are you talking about. But in Android marshmallow there have a hidden settings for doze but we can't get it or saw in any settings . it's automatically loading when our device standby clearly ( running no sensors, running no media players,) a idle means correct ideal phone stayed in a table. So the option will automatically make other programs deep sleep excluding our priority setted application
Sent from my Lenovo A7010a48 using XDA-Developers mobile app
I'm sorry for necro-posting, but it's for future generations.
I believe you guys have installed this third-party app, named "Doze" (which is, of course, unrelated to the real Doze, implemented in the Android framework).
It provides an accessibility service, which then appears in the Accessibility settings. I'd say it's a bit unfortunate that it's not made clear that it comes from a third-party app. Of course, the service being named simply "Doze", same as an Android feature, doesn't help.
For maximum googlability, here's how the service describes itself when clicked in Settings:
Enabling Doze accessibility service helps aggressive mode work better.
You may receive warning of potential privacy risks. Please rest assured as it is a regular warning when you enable any accessibility service.
Doze does NOT collect your private information ever and forever.
Click to expand...
Click to collapse
Whether you trust the developer or not is up to you.

Mi Band 4 - frequently asked questions

I've compiled a short list of frequently asked questions seen over various forums or points which were not clear to me (even as a user of MB2). If you find anything missing or incorrect, please let me know.
Q: How to track sleep?
A: Sleep is tracked automatically during night hours, Heart Rate sleep assistance can help in improvement of the detection of various phases. To view the sleep stats, open Mi Fit app and sync the band. Sleep/naps are not detected during day hours.
Q: Does Mi Band have automatic workout tracking?
A: No, workouts have to be started manually either from Mi Fit, or from the band directly.
Q: How to use 24/7 HR with less battery usage?
A: Configure "Automatic heart rate detection & Sleep assistant", detection frequency as desired. Do NOT enable activity detection - it will switch to continuous HR measurements whenever there is some activity detected (e.g. walking). When needed, use manual workout for continuous HR monitoring instead (which will also gather additional statistics).
Q: How to use a 3rd party watch face?
A: The most easy way is to use app like Notify & Fitness, Mi Band tools, etc to apply the watch face directly. Great selection of watch faces can be found here https://amazfitwatchfaces.com/mi-band-4/top. AmazFaces populates the "My band displays" in Mi Fit application.
Q: Is MB4 waterproof? Can I swim/shower with it?
A: Per standard GB/T 30106-2013 (or ISO 22810 : 2010(R2016)), 50m water resistance is rated as suitable for showering, surface swimming and shallow snorkeling. Diving is not recommended. After each submersion in sea water you have to clean the watch/band in fresh water.
Q: MB4 cycles through menu during water activities.
A: Enable lock screen on the band and try avoiding running water in the "down->up" direction. Shower can easily imitate slide up gesture and unlock the screen.
Q: MB4 detects HR when laying on the table or wrapped around inanimate objects.
A: "Signal-to-noise ratio of a real blood flow is sometimes very low so the algorithms are very sensitive in screening for any non-random components in the light variation, and when such are found they are interpreted as HR. So, the algorithms pretty much always find something which is not completely random and interpret that as a HR."
Source: https://www.wareable.com/fitness-trackers/why-heart-rate-monitor-work-on-toilet-rolls-6606
Q: What is behavior tagging in Mi Fit?
A: AFAIK behavior tagging is there only to help developers to make the band more accurate, once you stop the activity, data collected from sensors are uploaded to Xiaomi. It does not impact nor improve your statistics directly and it certainly drains the battery as sensors are being constantly pulled for data. When you start an activity, press the button in the upper right corner - it will switch to real time raw data of sensors.
Q: Is there a hardcoded minimum Heart Rate value (e.g. 47bpm)?
A: Band measures as low as 40bpm (if this value is actually 100% correct is hard to tell as it happens during sleep ).
Q: Are there 3rd party apps for Mi Band management? I do not like Mi Fit.
A: M̶i̶ ̶F̶i̶t̶ ̶i̶s̶ ̶m̶a̶n̶d̶a̶t̶o̶r̶y̶ ̶f̶o̶r̶ ̶a̶l̶l̶ ̶3̶r̶d̶ ̶p̶a̶r̶t̶y̶ ̶a̶p̶p̶s̶ ̶f̶o̶r̶ ̶t̶h̶e̶ ̶t̶i̶m̶e̶ ̶b̶e̶i̶n̶g̶.̶ ̶N̶o̶t̶i̶f̶y̶ ̶&̶ ̶F̶i̶t̶n̶e̶s̶s̶ ̶i̶s̶ ̶d̶e̶s̶i̶g̶n̶e̶d̶ ̶a̶s̶ ̶a̶l̶m̶o̶s̶t̶ ̶a̶b̶s̶o̶l̶u̶t̶e̶ ̶r̶e̶p̶l̶a̶c̶e̶m̶e̶n̶t̶ ̶o̶f̶ ̶M̶i̶ ̶F̶i̶t̶ ̶a̶n̶d̶ ̶t̶h̶e̶r̶e̶ ̶i̶s̶ ̶a̶ ̶h̶i̶g̶h̶ ̶c̶h̶a̶n̶c̶e̶ ̶t̶h̶a̶t̶ ̶i̶t̶ ̶w̶i̶l̶l̶ ̶w̶o̶r̶k̶ ̶a̶s̶ ̶a̶ ̶s̶t̶a̶n̶d̶a̶l̶o̶n̶e̶ ̶a̶p̶p̶ ̶i̶n̶ ̶t̶h̶e̶ ̶f̶u̶t̶u̶r̶e̶ ̶(̶s̶a̶m̶e̶ ̶a̶s̶ ̶w̶i̶t̶h̶ ̶M̶B̶2̶ ̶a̶n̶d̶ ̶M̶B̶3̶)̶.̶ ̶O̶t̶h̶e̶r̶ ̶a̶p̶p̶s̶ ̶a̶r̶e̶ ̶o̶n̶l̶y̶ ̶a̶d̶d̶i̶t̶i̶o̶n̶s̶ ̶a̶n̶d̶ ̶r̶e̶q̶u̶i̶r̶e̶ ̶M̶i̶ ̶F̶i̶t̶ ̶t̶o̶ ̶b̶e̶ ̶i̶n̶s̶t̶a̶l̶l̶e̶d̶ ̶a̶n̶d̶ ̶u̶s̶e̶d̶.̶ It is possible to use N&F and some other apps in standalone mode, for more information follow https://www.freemyband.com/ guide (root and no root options available).
Q: I don't see detailed stats (steps, sleep, heart rate) for previous days, only summary in history.
A: When on the detailed screen of the current day, swipe right to navigate to detailed stats of previous days.
Q: Mi Band keeps unfastening itself during sleep or when dressing/wearing backpack etc.
A: Try to wear the band reversed (strap loop away from you, fastening button towards you). Also you can buy a silicone strap keeper (generic 14mm or specifically for Mi Band on Ali/eBay/..) to keep band on hand even when accidentally unfastened.
-- reserved -- (even though not sure that required)
Hello, I just have a curiosity regarding the effective frequency used by Mi Band 4 to track the steps.
Sometimes it tracks steps very fluently, almost in real time; other times instead it stops counting on the display and after a while it adds a group of steps in a bunch (it always tracks steps but on the display it's not always reported in real time).
Why does it happen?
Does the heartbeat frequency detenction work in the same way or is it different?
Thanks
In my experience, steps are updated in real time when there is a long enough continual activity (walking outside, running etc.). For short activities with a lot of breaks (around the house) it tends to update in batches. It might have something to do with "clearing up the noise" - band waits for "chaotic" small numbers to accumulate and then applies some kind of statistical filter to provide accurate number of steps. Also all activities must have 10 steps at minimum.
Maybe someone else has better explanation though..
Heart beat rate is being recorded by Mi Band itself at set frequency and displayed on the phone only after sync (or during workout). For some reason watch faces with HR display show different value than Mi Fit after the sync. So far I haven't figured why
Hi,
Is it possible to make the band vibrate when it looses BT connection? I tried using "Anti-loss my phone feature" in "Notify & Fitness app" but it says "Instead this option use native connection lost notification for best results". Where can I find this native option?
Best regards
kslonka said:
Hi,
Is it possible to make the band vibrate when it looses BT connection? I tried using "Anti-loss my phone feature" in "Notify & Fitness app" but it says "Instead this option use native connection lost notification for best results". Where can I find this native option?
Best regards
Click to expand...
Click to collapse
As far as I know, this feature was part of the official firmware on Mi Band 2, but has been removed on Mi Band 3 and 4. N&F offers a workaround with alarms which are constantly being rescheduled, but as it's written in the instructions, this "beta feature" will most probably drain your phone and band battery very quickly. If you really miss this feature, you could try submitting a feature request via Mi Fit app and hope that it'll get implemented some day officially.
_mysiak_ said:
As far as I know, this feature was part of the official firmware on Mi Band 2, but has been removed on Mi Band 3 and 4.
Click to expand...
Click to collapse
Do you know if there is a custom firmware that has this feature?
Anyway, thanks for your reply. I've ordered Mi Band 2 and if it works better for me I'll return the 4.
How can I share my mifit band 4 activities from the official mifit app? The latest in Google play I mean
kslonka said:
Do you know if there is a custom firmware that has this feature?
Anyway, thanks for your reply. I've ordered Mi Band 2 and if it works better for me I'll return the 4.
Click to expand...
Click to collapse
There is no custom firmware for MB4 as of now, only custom resources (languages, icons). Also I found an information that firmware must be signed, so unless someone finds a way how to crack this security mechanism, there won't be a custom firmware.
I find MB2 still very good, but nice big screen with custom watch faces and easy starting of workouts from MB4 is very addictive. Just curious - why do you find this "anti loss" feature so important?
felixcuceanu said:
How can I share my mifit band 4 activities from the official mifit app? The latest in Google play I mean
Click to expand...
Click to collapse
What exactly do you want to share? Workouts can be synced to Google Fit for example, or exported as a screenshot from Mi Fit.
_mysiak_ said:
why do you find this "anti loss" feature so important?
Click to expand...
Click to collapse
I work at a large software company, we have on-call duty so I need to be available. When I want to go to the beach or to the swimming pool I would like to get notifications from my band. If I loose the connection to the phone and do not get a notification I might miss some critical alert.
kslonka said:
I work at a large software company, we have on-call duty so I need to be available. When I want to go to the beach or to the swimming pool I would like to get notifications from my band. If I loose the connection to the phone and do not get a notification I might miss some critical alert.
Click to expand...
Click to collapse
I see. For your use case I would look for a smart watch with a SIM card. Using a smart band connected to a phone will be extremely limiting for you. Even if you'll receive the notification that you're out of range, this will happen more often than not - practically almost immediately once you're in the water or a couple of meters away from the phone, so I'd expect to be notified very often. Btw. MB4 shows on the watch face once it's disconnected from the phone, but it's only a small icon - there is no vibration or any special notification shown. It might help if you glance at your band every now and then..
_mysiak_ said:
There is no custom firmware for MB4 as of now, only custom resources (languages, icons). Also I found an information that firmware must be signed, so unless someone finds a way how to crack this security mechanism, there won't be a custom firmware.
I find MB2 still very good, but nice big screen with custom watch faces and easy starting of workouts from MB4 is very addictive. Just curious - why do you find this "anti loss" feature so important?
What exactly do you want to share? Workouts can be synced to Google Fit for example, or exported as a screenshot from Mi Fit.
Click to expand...
Click to collapse
I managed to share directly from the app by pressing on the activity result. Thank you! I shared it as an image
_mysiak_ said:
I see. For your use case I would look for a smart watch with a SIM card.
Click to expand...
Click to collapse
Do you have any recommendations? I prefer android and would love it to be completely standalone (I'm not sure about eSIM).
_mysiak_ said:
Using a smart band connected to a phone will be extremely limiting for you. Even if you'll receive the notification that you're out of range, this will happen more often than not - practically almost immediately once you're in the water or a couple of meters away from the phone, so I'd expect to be notified very often.
Click to expand...
Click to collapse
I did not know that bluetooth range is reduced to a couple of inches when the device is under water :/. If MB2 would vibrate every time my hand goes under wanter then I do not want it. I guess I can use MB4 and "mi bandage" / "fitness & notify" phone loss feature when I go into the water with an interval ~5 min to remind me to get out of water and check to see if there are any notifications and I can disable it when I do not want it.
kslonka said:
Do you have any recommendations? I prefer android and would love it to be completely standalone (I'm not sure about eSIM).
I did not know that bluetooth range is reduced to a couple of inches when the device is under water :/. If MB2 would vibrate every time my hand goes under wanter then I do not want it. I guess I can use MB4 and "mi bandage" / "fitness & notify" phone loss feature when I go into the water with an interval ~5 min to remind me to get out of water and check to see if there are any notifications and I can disable it when I do not want it.
Click to expand...
Click to collapse
Personally I don't have any experience with smart watches beyond Mi Band, but the usual choice seems to be Samsung Galaxy watch series.
Bluetooth in general doesn't have great penetration of solid obstacles, in my experience it reaches about max 5 meters with one or two walls in the way, and often it's even less. Situation is slightly better in open space. Quick Google search says, that watch will lose connectivity just about 3 cm under water (which may be the case with eSIM too, I couldn't find more info about it). With WiFi it's about 15cm (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3355409/). I guess that simple reminder to check your phone will be probably your best choice if you're planning to spend some time in water (or leave someone near your phone and he/she will let you know if any notification arrives ).
kslonka said:
I work at a large software company, we have on-call duty so I need to be available. When I want to go to the beach or to the swimming pool I would like to get notifications from my band. If I loose the connection to the phone and do not get a notification I might miss some critical alert.
Click to expand...
Click to collapse
IMHO the app Mi Bandage can emulate this behaviour by continuously setting up an alarm on the Mi Band a few minutes in the future. So the alarm will trigger if it's time doesn't get updated by the app because the connection was lost. I wish I could emulate this behaviour with Tasker somehow without needing the app. (currently using Gagetbridge and additionally Mi Band Tools just because of the gesture support for Tasker. But I can't recommend because Mi Band Tools is very annoying regarding asking you to enable notification access for the Mi Fit app even if it's not installed)
sunsero said:
IMHO the app Mi Bandage can emulate this behaviour by continuously setting up an alarm on the Mi Band a few minutes in the future. So the alarm will trigger if it's time doesn't get updated by the app because the connection was lost. I wish I could emulate this behaviour with Tasker somehow without needing the app. (currently using Gagetbridge and additionally Mi Band Tools just because of the gesture support for Tasker. But I can't recommend because Mi Band Tools is very annoying regarding asking you to enable notification access for the Mi Fit app even if it's not installed)
Click to expand...
Click to collapse
This is exactly what N&F does. Though prolonged use will have impact on the battery as it needs very often wake locks and data synchronizations.
How can I install 1.0.7.0.4 on miband four?
felixcuceanu said:
How can I install 1.0.7.0.4 on miband four?
Click to expand...
Click to collapse
From N&F app. But you need to remove Mi Fit (or replace it with patched version), otherwise it will reflash the FW with the latest official stable version (1.0.6.16).
Is there any posibility to get sleep data (REM) in realtime from miband 4? Raw data don't interesting. For my project with arduino and etc. Or maybe sensor + sleep phase recognition.
IlluminatusII said:
Is there any posibility to get sleep data (REM) in realtime from miband 4? Raw data don't interesting. For my project with arduino and etc. Or maybe sensor + sleep phase recognition.
Click to expand...
Click to collapse
I don't think that it's possible. Sleep is calculated afterwards, only after the sleep has ended, and from raw data gathered during the night. For example start of sleep is using historic data - e.g. no movement for 5 minutes, add canditate for sleep start, if no further major movement detected within 30 minutes, make it permanent, if steps detected, cancel sleep tracking. You can't have this kind of data in real time. Also band itself doesn't do any calculations, the sleep processing is done in the app.

Categories

Resources