[General Accessories] Bonoboo:
Reminder if you moving insufficiently

Also check other useful additions for Mi Band

Important!

This is no longer works due changes in Mi Fit app.

Guaranteed working at least on ancient 1.4.341 which support only band with color LED.

This feature now much better implemented in powerful app Mi Band Tools

Also it provides very flexible notifications from apps.

What is this

It's ported Jawbone feature: if some time you moved insufficient it remind you to make some exercise.

If you use some notification solution (Mi Fit mod, Mi Band Tools, internal feature) bracelet also can vibrate.

You can adjust time period, frequency of checks and most important – threshold of activity (amount of steps).

To obtain data from time to time in background will be performing synchronization.

How it works

Created using Tasker: via App Factory project exported into standalone APK.

At first manual launch setting variables

In future task-cycle launches automatically at chosen period of time

If Bluetooth turned off – it's turning on

If screen off: launching Mi Fit app

If now screen on: wait until it turned it off so it will not interfere with you

Monitoring every second end of synchronization

Because for various reasons it can not take place there is timeout in 30 seconds

After synchronization you will switch to the launcher (all will be minimized)

Obtaining data about current amount of steps and your goal

Performed logic based on variables and calculating difference between the two steps values

If resulting number is greater than specified threshold – goes back to the beginning of cycle, i.e. waiting for next sync

If smaller, i.e. you move is not enough – you will notified with optional sound / vibration

Also in notification will be given current amount of steps and how much left to the goal

Next task goes back to the beginning of cycle, i.e. waiting for next sync

If time outside specified range: cycle stops until automatic launch via time range

Settings description

If you want change settings: clean app data or delete it and install again.

For Tasker: change variables.

– Start at, time – start monitoring at, delimiter - dot

– End at, time – stop monitoring at, delimiter - dot

– Checks period, min – time between syncs in minutes. Preferred 60, i.e. every hour

– Min steps – if amount steps between checks less this value – notification

– Vibration on phone? – controls vibration on phone at reminder (1 - on, 0 - off)

About battery discharge

Because there is time context app / Tasker wakes up phone every minute.

It's just designed that way. But do not worry, it wakes up just for milliseconds.

For 8 hours was 500 wakeups, but CPU was active only 7 seconds.

So do not pay attention, it has no appreciable effect on the battery.

But automatic synchronization can take up to 35 seconds awakened CPU.

Plus sending data via internet, although connection not required.

But since screen is off intake should be less.

Just think that it's you opening app to check stats.

To disable app you need delete or "freeze" it.

Requirements

– Root to access apps data

– Binary utility sqlite3 to read database: not all ROM's include it, so better install manually

Installation

1. Check via file manager (RootExplorer) file /system/xbin/sqlite3

2. If it absent: download sqlite3.img below post and remove extension .img (source)

3. Copy this file to /system/xbin

4. Via file manager set permission on it "all 9 ticks" (chmod 777)

5. Download and install application below post (Mi_Band_Activity_Reminder.apk)

6. Run it. Enter all settings, details above

7. Allow root-access

8. When Mi Fit app popup: pull bar down as manual sync

9. You can hide it's icon from launcher, we don't need it anymore

10. If you want sound with notification, only if screen off: place desired sound file move into /sdcard (short, MP3 or OGG)

11. If you using version of Mi Fit app with notifications: configure vibration to Mi Band Activity Reminder

Installation if you use Tasker

1. Check via file manager (RootExplorer) file /system/xbin/sqlite3

2. If it absent: download sqlite3.mp3 below post and remove extension .mp3 (source)

3. Copy this file to /system/xbin

4. Via file manager set permission on it "all 9 ticks" (chmod 777)

5. Download below post profile (Mi_Band_Activity_Reminder.prf.zip)

6. File from ZIP copy to /sdcard/Tasker/profiles

7. Tasker > tap on the tab Profiles > Import > Mi_Band_Activity_Reminder

8. Start same name task. Enter all settings, details above

9. Allow root-access

10. When Mi Fit app popup: pull bar down as manual sync

11. If you want sound with notification, only if screen off: place desired sound file move into /sdcard (short, MP3 or OGG)

12. If you using version of Mi Fit app with notifications: configure vibration for Tasker

Changelog

1.2

– fixed bug when data can't parsed if there performed some exercises

1.1

– slightly changed logic

– improved input initial settings

– notification sound will be only if screen off

– preventing entering less than 20 minutes as delay, it will fall-back to 20 (34)

1.0

– initial release