Skip to content

Commit

Permalink
2018-07-30 update.
Browse files Browse the repository at this point in the history
  • Loading branch information
JethroLee committed Jul 31, 2018
1 parent 4aaeb51 commit 779f816
Show file tree
Hide file tree
Showing 39 changed files with 1,454 additions and 0 deletions.
12 changes: 12 additions & 0 deletions GoFIT_SDK_Demo/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
*.iml
.gradle
./local.properties
./.idea/libraries
./.idea/modules.xml
./.idea/workspace.xml
./.idea/misc.xml
./.idea/caches/*
.DS_Store
./build
./captures
.externalNativeBuild
1 change: 1 addition & 0 deletions GoFIT_SDK_Demo/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
38 changes: 38 additions & 0 deletions GoFIT_SDK_Demo/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
applicationId "com.goyourlife.gofit_demo"
minSdkVersion 18
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

allprojects {
repositories {
flatDir {
dirs 'libs'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

implementation (name:'GoFIT_SDK-release', ext:'aar')
}
1 change: 1 addition & 0 deletions GoFIT_SDK_Demo/app/libs/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# GoFIT SDK (Library)
1 change: 1 addition & 0 deletions GoFIT_SDK_Demo/app/libs/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# GoFIT SDK (Library)
1 change: 1 addition & 0 deletions GoFIT_SDK_Demo/app/libs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
請下載 GoFIT_SDK-release.aar 並將之放在此目錄內。
21 changes: 21 additions & 0 deletions GoFIT_SDK_Demo/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.goyourlife.gofit_demo;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.goyourlife.gofit_demo", appContext.getPackageName());
}
}
46 changes: 46 additions & 0 deletions GoFIT_SDK_Demo/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.goyourlife.gofit_demo">

<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />

<uses-feature
android:name="android.hardware.bluetooth_le"
android:required="true" />
<uses-feature
android:name="android.hardware.location"
android:required="false" />
<uses-feature
android:name="android.hardware.location.gps"
android:required="false" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppBaseTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

<service
android:name="com.golife.service.SyncService"
android:enabled="true" />

<service
android:name="com.golife.service.dfu.v20160706.DfuService"
android:enabled="true" />

</application>

</manifest>
3 changes: 3 additions & 0 deletions GoFIT_SDK_Demo/app/src/main/assets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
請將您收到的授權檔案 `client_cert.crt` 放在本目錄下。

同時,如果您有收到 firmware 的 OTA 更新 image (*.hex 檔案),也是放置於本目錄下。
Loading

0 comments on commit 779f816

Please sign in to comment.