Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SedentaryBehaviourApplication
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Joseph De Jonckheere CESM2014
SedentaryBehaviourApplication
Commits
4c9536df
Commit
4c9536df
authored
6 years ago
by
Peter Joseph De Jonckheere CESM2014
Browse files
Options
Downloads
Patches
Plain Diff
Added awareness api
parent
269f7f35
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/main/AndroidManifest.xml
+6
-0
6 additions, 0 deletions
src/main/AndroidManifest.xml
src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java
+4
-0
4 additions, 0 deletions
...tificationFramework/stimulusStrategy/SigMotionDetect.java
with
10 additions
and
0 deletions
src/main/AndroidManifest.xml
+
6
−
0
View file @
4c9536df
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
<uses-permission
android:name=
"android.permission.VIBRATE"
/>
<uses-permission
android:name=
"android.permission.VIBRATE"
/>
<uses-permission
android:name=
"android.permission.RECEIVE_BOOT_COMPLETED"
/>
<uses-permission
android:name=
"android.permission.RECEIVE_BOOT_COMPLETED"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
/>
<uses-permission
android:name=
"android.permission.ACCESS_FINE_LOCATION"
/>
<application
<application
android:allowBackup=
"true"
android:allowBackup=
"true"
...
@@ -15,6 +16,7 @@
...
@@ -15,6 +16,7 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
android:theme=
"@style/AppTheme"
>
<activity
android:name=
"com.notificationFramework.sedentary.frontEnd.MainActivity"
>
<activity
android:name=
"com.notificationFramework.sedentary.frontEnd.MainActivity"
>
<intent-filter>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<action
android:name=
"android.intent.action.MAIN"
/>
...
@@ -52,5 +54,9 @@
...
@@ -52,5 +54,9 @@
</action>
</action>
</intent-filter>
</intent-filter>
</receiver>
</receiver>
<meta-data
android:name=
"com.google.android.awareness.API_KEY"
android:value=
"AIzaSyDRgsg2n4oPOSRGZ5qYb1QCAeADwoVC0lA"
>
</meta-data>
</application>
</application>
</manifest>
</manifest>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java
+
4
−
0
View file @
4c9536df
...
@@ -16,6 +16,8 @@ import android.support.annotation.Nullable;
...
@@ -16,6 +16,8 @@ import android.support.annotation.Nullable;
import
android.support.v4.content.LocalBroadcastManager
;
import
android.support.v4.content.LocalBroadcastManager
;
import
android.util.Log
;
import
android.util.Log
;
import
com.google.android.gms.awareness.Awareness
;
import
com.google.android.gms.common.api.GoogleApiClient
;
import
com.notificationFramework.sedentary.frontEnd.R
;
import
com.notificationFramework.sedentary.frontEnd.R
;
import
com.notificationFramework.sedentary.frontEnd.SaveFile
;
import
com.notificationFramework.sedentary.frontEnd.SaveFile
;
...
@@ -93,6 +95,8 @@ public class SigMotionDetect extends Service implements StimulusStrategy {
...
@@ -93,6 +95,8 @@ public class SigMotionDetect extends Service implements StimulusStrategy {
*/
*/
@Override
@Override
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
public
int
onStartCommand
(
Intent
intent
,
int
flags
,
int
startId
)
{
GoogleApiClient
client
=
new
GoogleApiClient
.
Builder
(
this
)
.
addApi
(
Awareness
.
API
).
build
();
am
=
(
AlarmManager
)
this
.
getSystemService
(
Context
.
ALARM_SERVICE
);
am
=
(
AlarmManager
)
this
.
getSystemService
(
Context
.
ALARM_SERVICE
);
setUpClock
();
setUpClock
();
setUpDailyProgress
();
setUpDailyProgress
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment