Skip to content

Commit

Permalink
Merge pull request #2 from audaciouscode/cjk_withings_device_integration
Browse files Browse the repository at this point in the history
Withings device integration
  • Loading branch information
audaciouscode committed May 18, 2017
2 parents 0fd0684 + 45c5dd8 commit 48ea849
Show file tree
Hide file tree
Showing 113 changed files with 6,579 additions and 253 deletions.
6 changes: 5 additions & 1 deletion AndroidManifest.xml
@@ -1,10 +1,14 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.audacious_software.pdk.passivedatakit">
package="com.audacious_software.pdk.passivedatakit"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" tools:ignore="ProtectedPermissions" />
<application android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:theme="@style/AppTheme">
Expand Down
14 changes: 11 additions & 3 deletions build.gradle
Expand Up @@ -3,16 +3,23 @@ apply plugin: 'com.android.library'
buildscript {
repositories {
jcenter()
flatDir {
dirs 'libs'
}
}

dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.android.tools.build:gradle:2.3.2'
}
}

repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://dl.bintray.com/rvalerio/maven' }
flatDir{
dirs 'libs'
}
}

android {
Expand All @@ -22,7 +29,7 @@ android {
useLibrary 'org.apache.http.legacy'

defaultConfig {
minSdkVersion 14
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
Expand Down Expand Up @@ -60,6 +67,7 @@ android {
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.3'
compile 'com.github.philjay:mpandroidchart:v3.0.1'
compile 'com.rvalerio:fgchecker:1.0.1'
}

buildTypes {
Expand All @@ -68,4 +76,4 @@ android {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
}
Binary file added res/drawable-hdpi/ic_foreground_apps.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_page_indicator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_pdk_accelerometer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_pdk_action_lock.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_pdk_action_unlock.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_pdk_ambient_light.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_pdk_app_events.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-hdpi/ic_pdk_device_battery.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added res/drawable-hdpi/ic_pdk_system_status.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file added res/drawable-hdpi/ic_pdk_withings_device.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_foreground_apps.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_page_indicator.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_pdk_accelerometer.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_pdk_action_lock.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_pdk_action_unlock.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_pdk_ambient_light.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_pdk_app_events.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added res/drawable-mdpi/ic_pdk_device_battery.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added res/drawable-mdpi/ic_pdk_system_status.png
File renamed without changes
Binary file added res/drawable-mdpi/ic_pdk_withings_device.png
Binary file added res/drawable-xhdpi/ic_foreground_apps.png
Binary file added res/drawable-xhdpi/ic_page_indicator.png
Binary file added res/drawable-xhdpi/ic_pdk_accelerometer.png
Binary file added res/drawable-xhdpi/ic_pdk_action_lock.png
Binary file added res/drawable-xhdpi/ic_pdk_action_unlock.png
Binary file added res/drawable-xhdpi/ic_pdk_ambient_light.png
Binary file added res/drawable-xhdpi/ic_pdk_app_events.png
Binary file added res/drawable-xhdpi/ic_pdk_device_battery.png
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added res/drawable-xhdpi/ic_pdk_system_status.png
File renamed without changes
Binary file added res/drawable-xhdpi/ic_pdk_withings_device.png
Binary file added res/drawable-xxhdpi/ic_foreground_apps.png
Binary file added res/drawable-xxhdpi/ic_page_indicator.png
Binary file added res/drawable-xxhdpi/ic_pdk_accelerometer.png
Binary file added res/drawable-xxhdpi/ic_pdk_action_lock.png
Binary file added res/drawable-xxhdpi/ic_pdk_action_unlock.png
Binary file added res/drawable-xxhdpi/ic_pdk_ambient_light.png
Binary file added res/drawable-xxhdpi/ic_pdk_app_events.png
Binary file added res/drawable-xxhdpi/ic_pdk_device_battery.png
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added res/drawable-xxhdpi/ic_pdk_system_status.png
File renamed without changes
Binary file added res/drawable-xxhdpi/ic_pdk_withings_device.png
Binary file added res/drawable-xxxhdpi/ic_foreground_apps.png
Binary file added res/drawable-xxxhdpi/ic_page_indicator.png
Binary file added res/drawable-xxxhdpi/ic_pdk_accelerometer.png
Binary file added res/drawable-xxxhdpi/ic_pdk_action_lock.png
Binary file added res/drawable-xxxhdpi/ic_pdk_action_unlock.png
Binary file added res/drawable-xxxhdpi/ic_pdk_ambient_light.png
Binary file added res/drawable-xxxhdpi/ic_pdk_app_events.png
Binary file added res/drawable-xxxhdpi/ic_pdk_device_battery.png
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added res/drawable-xxxhdpi/ic_pdk_system_status.png
File renamed without changes
Binary file added res/drawable-xxxhdpi/ic_pdk_withings_device.png
63 changes: 63 additions & 0 deletions res/layout/card_generator_app_event.xml
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp"
android:layout_margin="8dp">
<LinearLayout
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#424242"
android:padding="8dp"
android:baselineAligned="false">
<ImageView android:src="@drawable/ic_pdk_app_events"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginRight="8dp" />
<TextView android:text="@string/generator_app_events"
android:gravity="center_vertical|start"
android:layout_width="0dp"
android:layout_height="24dp"
android:layout_weight="1"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@android:color/white" />
<TextView android:id="@+id/generator_data_point_date"
android:gravity="center_vertical"
android:layout_width="wrap_content"
android:layout_height="24dp"
android:textSize="12sp"
android:textColor="@android:color/white"
android:layout_marginRight="8dp"/>
</LinearLayout>
<FrameLayout android:id="@+id/card_content"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<include layout="@layout/card_generator_app_event_page"
android:id="@+id/card_sizer" />
<android.support.v4.view.ViewPager
android:id="@+id/content_pager"
android:layout_width="match_parent"
android:layout_height="match_parent">
</android.support.v4.view.ViewPager>
</FrameLayout>
<TextView android:id="@+id/card_empty"
android:text="@string/message_generator_device_app_event_empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:padding="16dp" />
</LinearLayout>
</android.support.v7.widget.CardView>
</LinearLayout>
186 changes: 186 additions & 0 deletions res/layout/card_generator_app_event_page.xml
@@ -0,0 +1,186 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/app_event_row_0"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
<LinearLayout android:id="@+id/app_event_row_1"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F5F5F5">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
<LinearLayout android:id="@+id/app_event_row_2"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
<LinearLayout android:id="@+id/app_event_row_3"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F5F5F5">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
<LinearLayout android:id="@+id/app_event_row_4"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
<LinearLayout android:id="@+id/app_event_row_5"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F5F5F5">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
<LinearLayout android:id="@+id/app_event_row_6"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
<LinearLayout android:id="@+id/app_event_row_7"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#F5F5F5">
<TextView android:id="@+id/app_event_row_event_name"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="wrap_content"
android:text="-" />
<TextView android:id="@+id/app_event_row_event_when"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="4dp"
android:paddingBottom="4dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-" />
</LinearLayout>
</LinearLayout>
20 changes: 20 additions & 0 deletions res/layout/card_generator_daydream_vr_controller.xml
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="8dp">
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:cardCornerRadius="4dp"
android:layout_margin="16dp">
<TextView
android:id="@+id/label_generator"
android:layout_margin="16dp"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
</android.support.v7.widget.CardView>
</LinearLayout>

0 comments on commit 48ea849

Please sign in to comment.