├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── vcs.xml ├── inspectionProfiles │ ├── profiles_settings.xml │ └── Project_Default.xml ├── modules.xml ├── gradle.xml ├── compiler.xml └── misc.xml ├── app ├── .gitignore ├── src │ ├── main │ │ ├── web_hi_res_512.png │ │ ├── res │ │ │ ├── drawable-hdpi │ │ │ │ ├── ic_mili.png │ │ │ │ ├── ic_unit_cm.png │ │ │ │ ├── ic_unit_kg.png │ │ │ │ ├── ic_hint_mass.png │ │ │ │ ├── ic_hint_name.png │ │ │ │ ├── ic_hint_steps.png │ │ │ │ ├── ic_gender_female.png │ │ │ │ ├── ic_gender_male.png │ │ │ │ ├── ic_hint_height.png │ │ │ │ ├── ic_gender_male_disabled.png │ │ │ │ └── ic_gender_female_disabled.png │ │ │ ├── drawable-mdpi │ │ │ │ ├── ic_mili.png │ │ │ │ ├── ic_unit_cm.png │ │ │ │ ├── ic_unit_kg.png │ │ │ │ ├── ic_hint_mass.png │ │ │ │ ├── ic_hint_name.png │ │ │ │ ├── ic_hint_steps.png │ │ │ │ ├── ic_gender_female.png │ │ │ │ ├── ic_gender_male.png │ │ │ │ ├── ic_hint_height.png │ │ │ │ ├── ic_gender_male_disabled.png │ │ │ │ └── ic_gender_female_disabled.png │ │ │ ├── drawable-xhdpi │ │ │ │ ├── ic_mili.png │ │ │ │ ├── ic_unit_cm.png │ │ │ │ ├── ic_unit_kg.png │ │ │ │ ├── ic_hint_mass.png │ │ │ │ ├── ic_hint_name.png │ │ │ │ ├── ic_gender_male.png │ │ │ │ ├── ic_hint_height.png │ │ │ │ ├── ic_hint_steps.png │ │ │ │ ├── ic_gender_female.png │ │ │ │ ├── ic_gender_female_disabled.png │ │ │ │ └── ic_gender_male_disabled.png │ │ │ ├── drawable-xxhdpi │ │ │ │ ├── ic_mili.png │ │ │ │ ├── ic_unit_cm.png │ │ │ │ ├── ic_unit_kg.png │ │ │ │ ├── ic_gender_male.png │ │ │ │ ├── ic_hint_height.png │ │ │ │ ├── ic_hint_mass.png │ │ │ │ ├── ic_hint_name.png │ │ │ │ ├── ic_hint_steps.png │ │ │ │ ├── ic_gender_female.png │ │ │ │ ├── ic_gender_male_disabled.png │ │ │ │ └── ic_gender_female_disabled.png │ │ │ ├── drawable-xxxhdpi │ │ │ │ ├── ic_mili.png │ │ │ │ ├── ic_unit_cm.png │ │ │ │ ├── ic_unit_kg.png │ │ │ │ ├── ic_hint_mass.png │ │ │ │ ├── ic_hint_name.png │ │ │ │ ├── ic_hint_steps.png │ │ │ │ ├── ic_gender_male.png │ │ │ │ ├── ic_hint_height.png │ │ │ │ ├── ic_gender_female.png │ │ │ │ ├── ic_gender_male_disabled.png │ │ │ │ └── ic_gender_female_disabled.png │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ ├── values │ │ │ │ ├── styles.xml │ │ │ │ ├── dimens.xml │ │ │ │ ├── attrs_steps_view.xml │ │ │ │ └── strings.xml │ │ │ ├── layout │ │ │ │ ├── ab_custom.xml │ │ │ │ ├── activity_search_band.xml │ │ │ │ ├── activity_main.xml │ │ │ │ ├── search_scan.xml │ │ │ │ ├── search_profile.xml │ │ │ │ ├── card_steps.xml │ │ │ │ └── band_profile.xml │ │ │ ├── drawable │ │ │ │ ├── radio_gender_female.xml │ │ │ │ └── radio_gender_male.xml │ │ │ ├── values-w820dp │ │ │ │ └── dimens.xml │ │ │ └── menu │ │ │ │ └── menu_main.xml │ │ ├── java │ │ │ └── io │ │ │ │ └── github │ │ │ │ └── indrora │ │ │ │ └── jouretnuit │ │ │ │ ├── miband │ │ │ │ ├── data │ │ │ │ │ ├── IBinaryData.java │ │ │ │ │ ├── ICharacteristicBound.java │ │ │ │ │ ├── NotifyHandler.java │ │ │ │ │ ├── BattStats.java │ │ │ │ │ ├── UserInfo.java │ │ │ │ │ ├── StepCount.java │ │ │ │ │ └── BatteryInfo.java │ │ │ │ ├── Helper.java │ │ │ │ └── BandConstants.java │ │ │ │ ├── model │ │ │ │ ├── ActivityDay.java │ │ │ │ ├── ActivityPeriod.java │ │ │ │ └── StringConstants.java │ │ │ │ ├── JENApp.java │ │ │ │ ├── MiBandService.java │ │ │ │ ├── SearchBandActivity.java │ │ │ │ ├── widget │ │ │ │ ├── StepsView.java │ │ │ │ └── CircleGaugeView.java │ │ │ │ ├── ActivityHistoryAdapter.java │ │ │ │ ├── MainActivity.java │ │ │ │ └── MiBandDevice.java │ │ └── AndroidManifest.xml │ └── androidTest │ │ └── java │ │ └── io │ │ └── github │ │ └── indrora │ │ └── jouretnuit │ │ └── ApplicationTest.java ├── proguard-rules.pro ├── build.gradle └── app.iml ├── settings.gradle ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── .gitignore ├── account.svg ├── gender-female.svg ├── gender-male.svg ├── account-circle.svg ├── weight.svg ├── README ├── gradle.properties ├── Jour-et-Nuit.iml ├── .navigation └── app │ └── raw │ └── main.nvg.xml ├── weight-kilogram.svg ├── LICENSE ├── user_height.svg ├── gradlew.bat ├── mili.svg ├── unit_kg.svg ├── unit_cm.svg ├── gradlew └── protocol.txt /.idea/.name: -------------------------------------------------------------------------------- 1 | Jour et Nuit -------------------------------------------------------------------------------- /app/.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /app/src/main/web_hi_res_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/web_hi_res_512.png -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_mili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_mili.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_mili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_mili.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_mili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_mili.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_unit_cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_unit_cm.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_unit_kg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_unit_kg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_unit_cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_unit_cm.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_unit_kg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_unit_kg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_unit_cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_unit_cm.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_unit_kg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_unit_kg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_mili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_mili.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_mili.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_mili.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_hint_mass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_hint_mass.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_hint_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_hint_name.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_hint_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_hint_steps.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_hint_mass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_hint_mass.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_hint_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_hint_name.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_hint_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_hint_steps.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_hint_mass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_hint_mass.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_hint_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_hint_name.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_unit_cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_unit_cm.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_unit_kg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_unit_kg.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_unit_cm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_unit_cm.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_unit_kg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_unit_kg.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_gender_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_gender_female.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_gender_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_gender_male.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_hint_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_hint_height.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_gender_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_gender_female.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_gender_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_gender_male.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_hint_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_hint_height.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_gender_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_gender_male.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_hint_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_hint_height.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_hint_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_hint_steps.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_gender_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_gender_male.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_hint_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_hint_height.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_hint_mass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_hint_mass.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_hint_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_hint_name.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_hint_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_hint_steps.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_hint_mass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_hint_mass.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_hint_name.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_hint_name.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_hint_steps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_hint_steps.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_gender_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_gender_female.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_gender_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_gender_female.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_gender_male.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_gender_male.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_hint_height.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_hint_height.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_gender_female.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_gender_female.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_gender_male_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_gender_male_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_gender_male_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_gender_male_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_gender_female_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-hdpi/ic_gender_female_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_gender_female_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-mdpi/ic_gender_female_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_gender_female_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_gender_female_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_gender_male_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xhdpi/ic_gender_male_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_gender_male_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_gender_male_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_gender_male_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_gender_male_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_gender_female_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxhdpi/ic_gender_female_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxxhdpi/ic_gender_female_disabled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrora/jour-et-nuit/HEAD/app/src/main/res/drawable-xxxhdpi/ic_gender_female_disabled.png -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gitignore for basic android project. 2 | 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/tasks.xml 7 | /.idea/libraries 8 | .DS_Store 9 | /build 10 | /captures 11 | 12 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Wed Apr 10 15:27:10 PDT 2013 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip 7 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/miband/data/IBinaryData.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.miband.data; 2 | 3 | /** 4 | * Created by indrora on 7/9/15. 5 | */ 6 | public interface IBinaryData { 7 | byte[] toBytes(); 8 | boolean fromBytes(byte[] in); 9 | } 10 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/miband/data/ICharacteristicBound.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.miband.data; 2 | 3 | /** 4 | * Created by indrora on 7/16/15. 5 | */ 6 | public interface ICharacteristicBound { 7 | 8 | void characteristicChanged(byte[] newValue); 9 | 10 | } 11 | -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 32dp 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/layout/ab_custom.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/model/ActivityDay.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.model; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * Created by indrora on 7/5/15. 7 | */ 8 | public class ActivityDay { 9 | public Date date; 10 | 11 | public ActivityPeriod[] activityPeriods; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/radio_gender_female.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/radio_gender_male.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /app/src/main/res/values/attrs_steps_view.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values-w820dp/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 64dp 6 | 7 | -------------------------------------------------------------------------------- /account.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 7 | 8 | -------------------------------------------------------------------------------- /app/src/androidTest/java/io/github/indrora/jouretnuit/ApplicationTest.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit; 2 | 3 | import android.app.Application; 4 | import android.test.ApplicationTestCase; 5 | 6 | /** 7 | * Testing Fundamentals 8 | */ 9 | public class ApplicationTest extends ApplicationTestCase { 10 | public ApplicationTest() { 11 | super(Application.class); 12 | } 13 | } -------------------------------------------------------------------------------- /gender-female.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /gender-male.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /account-circle.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /weight.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_search_band.xml: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 7 | 8 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/miband/data/NotifyHandler.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.miband.data; 2 | 3 | import android.bluetooth.BluetoothGatt; 4 | import android.bluetooth.BluetoothGattCharacteristic; 5 | import android.util.Log; 6 | 7 | /** 8 | * Created by indrora on 7/12/15. 9 | */ 10 | public abstract class NotifyHandler { 11 | private BluetoothGatt gatt; 12 | public NotifyHandler(BluetoothGatt g) { 13 | gatt = g; 14 | } 15 | public void handleChange(BluetoothGattCharacteristic characteristic) { 16 | Log.d("NotifyHandler", "Called handleChange() for "+characteristic.getUuid().toString()); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | Jour et Nuit 3 | 4 | Steps 5 | Sleep 6 | History 7 | 8 | Hello world! 9 | 10 | Settings 11 | 12 | %1$d kcal 13 | %1$d km 14 | 15 | 16 | Hello blank fragment 17 | Select Band 18 | 19 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in /home/indrora/Android/Sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | *** 2 | This project is unmaintained. There's a lot of reasons, but fundamentally, this project has finished for me. 3 | *** 4 | 5 | Jour Et Nuit: Day 'n' Nite. 6 | 7 | This software aims to be a functional replacement for the Xiaomi software for talking to the Xiaomi Mi Band called "Mi Fit" 8 | 9 | The goals of this software are to: 10 | 11 | * Provide a functional stand-in for the software without the need to create an account with Xiaomi 12 | * Offer more granular information density than is offered by the Xiaomi software 13 | * Export data (instead of holding it hostage) 14 | 15 | How I've done this 16 | ------------------ 17 | 18 | This software is the result of reading over a lot of HCI snoop logs and reverse engineering of the obfuscated application. 19 | 20 | The document "protocol.txt" is my knowledge of the protocol as it stands from multiple sources across the internet. 21 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | # Default value: -Xmx10248m -XX:MaxPermSize=256m 13 | # org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 14 | 15 | # When configured, Gradle will run in incubating parallel mode. 16 | # This option should only be used with decoupled projects. More details, visit 17 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 18 | # org.gradle.parallel=true -------------------------------------------------------------------------------- /Jour-et-Nuit.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 22 5 | buildToolsVersion "22.0.1" 6 | 7 | defaultConfig { 8 | applicationId "io.github.indrora.jouretnuit" 9 | minSdkVersion 18 10 | targetSdkVersion 22 11 | versionCode 1 12 | versionName "1.0" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | 23 | dependencies { 24 | compile fileTree(dir: 'libs', include: ['*.jar']) 25 | compile 'com.android.support:support-v13:22.2.0' 26 | compile 'com.android.support:appcompat-v7:22.2.0' 27 | compile 'com.android.support:cardview-v7:21.0.+' 28 | compile 'me.grantland:autofittextview:0.2.+' 29 | compile 'com.pnikosis:materialish-progress:1.5' 30 | compile 'com.android.support:recyclerview-v7:21.0.+' 31 | 32 | 33 | } -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/miband/data/BattStats.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.miband.data; 2 | 3 | import io.github.indrora.jouretnuit.miband.Helper; 4 | 5 | /** 6 | * Created by indrora on 7/10/15. 7 | */ 8 | public class BattStats implements IBinaryData { 9 | 10 | int timeWake = 0; 11 | int timeLight = 0; 12 | int timeConnect = 0; 13 | int timeVibrate = 0; 14 | int timeOther = 0; 15 | 16 | @Override 17 | public byte[] toBytes() { 18 | return null; 19 | } 20 | 21 | @Override 22 | public boolean fromBytes(byte[] in) { 23 | if(in == null) return false; 24 | if(in.length != 20) { return false; } 25 | 26 | this.timeWake = Helper.intFromBytes(in, 0); 27 | this.timeVibrate = Helper.intFromBytes(in, 4); 28 | this.timeLight = Helper.intFromBytes(in, 8); 29 | this.timeConnect = Helper.intFromBytes(in, 12); 30 | this.timeOther = Helper.intFromBytes(in, 16); 31 | 32 | return true; 33 | 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 22 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/model/ActivityPeriod.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.model; 2 | 3 | import java.util.Calendar; 4 | 5 | import io.github.indrora.jouretnuit.miband.data.UserInfo; 6 | 7 | /** 8 | * Created by indrora on 7/5/15. 9 | */ 10 | public class ActivityPeriod { 11 | public Calendar start; 12 | // we'll divide this by 60 later. 13 | public int minutes; 14 | public int steps; 15 | // in meters 16 | public int distance; 17 | 18 | public ActivityPeriod() { 19 | start = Calendar.getInstance(); 20 | minutes = 0; 21 | steps = 0; 22 | distance = 0; 23 | } 24 | 25 | public float caloriesBurned(UserInfo user) { 26 | // CB = [0.0215 x KPH^3 - 0.1765 x KPH^2 + 0.8710 x KPH + 1.4577] x WKG x T 27 | float km = (float)distance/1000f; 28 | float hr = (float)minutes/60f; 29 | float kmh = km/hr; 30 | return ( 31 | 0.0215f * (float)Math.pow(kmh, 3) 32 | - 0.7165f * (float)Math.pow(kmh, 2) 33 | + 1.4577f 34 | ) * (float)(user.mass) * hr; 35 | } 36 | 37 | 38 | } 39 | -------------------------------------------------------------------------------- /.navigation/app/raw/main.nvg.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 10 | 13 | 14 | 15 | 18 | 21 | 22 | 23 | 26 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /app/src/main/res/layout/search_scan.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 12 | 13 | 19 | 20 | 27 | 28 | -------------------------------------------------------------------------------- /weight-kilogram.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/miband/data/UserInfo.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.miband.data; 2 | 3 | import java.util.Arrays; 4 | 5 | import io.github.indrora.jouretnuit.miband.Helper; 6 | 7 | /** 8 | * Created by indrora on 7/9/15. 9 | */ 10 | public class UserInfo implements IBinaryData { 11 | 12 | public static final int GENDER_MALE = 1; 13 | public static final int GENDER_FEMALE = 0; 14 | 15 | public int age; 16 | public int height; 17 | public int mass; 18 | public int __type__; 19 | public int uid; 20 | public int gender; 21 | public byte[] alias; 22 | 23 | public String getStringAlias() { 24 | return String.valueOf(alias); 25 | } 26 | 27 | @Override 28 | public byte[] toBytes() { 29 | return new byte[0]; 30 | } 31 | 32 | @Override 33 | public boolean fromBytes(byte[] in) { 34 | if(in == null) return false; 35 | if(in.length != 20) return false; 36 | uid = Helper.intFromBytes(in, 0); 37 | gender = in[4]; 38 | age = in[5]; 39 | height = in[6]; 40 | mass = in[7]; 41 | __type__ = in[8]; 42 | alias = Arrays.copyOfRange(in, 9, 19); 43 | return true; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2015 Morgan ``Indrora'' Gangwere 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 17 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 18 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 20 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 21 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 22 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/java/io/github/indrora/jouretnuit/miband/data/StepCount.java: -------------------------------------------------------------------------------- 1 | package io.github.indrora.jouretnuit.miband.data; 2 | 3 | import android.content.Intent; 4 | import android.util.Log; 5 | 6 | import io.github.indrora.jouretnuit.JENApp; 7 | import io.github.indrora.jouretnuit.miband.Helper; 8 | import io.github.indrora.jouretnuit.model.StringConstants; 9 | 10 | /** 11 | * Created by indrora on 7/16/15. 12 | */ 13 | public class StepCount implements IBinaryData, ICharacteristicBound { 14 | private int steps = 0; 15 | 16 | public static final String KEY_STEP_COUNT = "steps"; 17 | 18 | public int getSteps() { return steps; } 19 | 20 | @Override 21 | public byte[] toBytes() { 22 | return null; 23 | } 24 | 25 | @Override 26 | public boolean fromBytes(byte[] in) { 27 | if(in.length == 4) { 28 | steps = (in[0] & 0xFF) + 29 | ((in[1] & 0xFF) << 8 )+ 30 | ((in[2] & 0xFF) << 16 )+ 31 | ((in[3] & 0xFF) << 24 ); 32 | Log.d("StepCount", "converted step count: "+steps); 33 | return true; 34 | } 35 | 36 | return false; 37 | } 38 | 39 | @Override 40 | public void characteristicChanged(byte[] newValue) { 41 | if(!this.fromBytes(newValue)) { 42 | Log.e("StepCount", "Failed: step count is wrong!"); 43 | } 44 | Intent intent = new Intent(StringConstants.RESPONSE_STEP_COUNT); 45 | intent.putExtra(KEY_STEP_COUNT, this.steps); 46 | JENApp.makeBroadcast(intent); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /app/src/main/res/layout/search_profile.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 |