Skip to content

Commit

Permalink
Initial Upload. Access Steps, Battery and LE Params. Not very stable …
Browse files Browse the repository at this point in the history
…yet.
  • Loading branch information
Paul Gavrikov committed Dec 20, 2014
0 parents commit 5cd686e
Show file tree
Hide file tree
Showing 489 changed files with 25,830 additions and 0 deletions.
Empty file added .metadata/.lock
Empty file.
562 changes: 562 additions & 0 deletions .metadata/.log

Large diffs are not rendered by default.

Binary file added .metadata/.mylyn/.taskListIndex/segments.gen
Binary file not shown.
Binary file added .metadata/.mylyn/.taskListIndex/segments_1
Binary file not shown.
Binary file added .metadata/.mylyn/repositories.xml.zip
Binary file not shown.
Binary file added .metadata/.mylyn/tasks.xml.zip
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,2 @@
background=#ffffff
foreground=#000000
2 changes: 2 additions & 0 deletions .metadata/.plugins/org.eclipse.cdt.core/.log
@@ -0,0 +1,2 @@
*** SESSION Dec 19, 2014 23:01:54.22 -------------------------------------------
*** SESSION Dec 19, 2014 23:18:34.28 -------------------------------------------
1 change: 1 addition & 0 deletions .metadata/.plugins/org.eclipse.cdt.make.core/specs.c
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions .metadata/.plugins/org.eclipse.cdt.make.core/specs.cpp
@@ -0,0 +1 @@

@@ -0,0 +1,37 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >

<ProgressBar
android:id="@+id/laoding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />

<TextView
android:id="@+id/text_steps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="8888"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_below="@+id/text_steps"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="steps today" />

</RelativeLayout>
@@ -0,0 +1,20 @@
<resources>

<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>

</resources>
@@ -0,0 +1,46 @@
package com.motioncoding.miband;

import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothManager;
import android.content.Context;
import android.os.Bundle;

public class MiOverviewActivity extends Activity {

private String mDeviceAddress;
private BluetoothManager mBluetoothManager;
private BluetoothAdapter mBluetoothAdapter;
private BluetoothDevice mMiBand;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getActionBar().hide();
mDeviceAddress = getIntent().getStringExtra("address");
setContentView(R.layout.activity_mi_overview);
mBluetoothManager = ((BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE));
mBluetoothAdapter = mBluetoothManager.getAdapter();
mMiBand = mBluetoothAdapter.getRemoteDevice(mDeviceAddress);
mMiBand.connectGatt(this, false, this);
}

@Override
public void onResume() {
super.onResume();

}

@Override
public void onPause() {
super.onPause();
}

private BluetoothGattCallback mGattCallback = new BluetoothGattCallback() {

};

}
@@ -0,0 +1,36 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="${relativePackage}.${activityClass}" >

<ProgressBar
android:id="@+id/laoding"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true" />

<TextView
android:id="@+id/text_steps"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="32dp"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="8888"
android:textAppearance="?android:attr/textAppearanceLarge" />

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_below="@+id/text_steps"
android:layout_centerHorizontal="true"
android:fontFamily="sans-serif-light"
android:gravity="center"
android:text="steps today" />

</RelativeLayout>
@@ -0,0 +1,26 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#414650"
tools:context="${relativePackage}.${activityClass}" >

<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/mili_vertical_icon" />

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:text="Looking for MiBand"
android:paddingBottom="50dp"
android:textAppearance="?android:attr/textAppearanceLarge" />

</RelativeLayout>
@@ -0,0 +1,25 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#414650"
tools:context="${relativePackage}.${activityClass}" >

<ImageView
android:id="@+id/image_miscan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:src="@drawable/searching_mili_icon" />

<TextView
android:layout_below="@+id/image_miscan"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:fontFamily="sans-serif-light"
android:text="Looking for MiBand"/>

</RelativeLayout>

0 comments on commit 5cd686e

Please sign in to comment.