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
d2d2a10b
Commit
d2d2a10b
authored
6 years ago
by
Peter Joseph De Jonckheere CESM2014
Browse files
Options
Downloads
Patches
Plain Diff
Need to get debug key.
parent
93cffaff
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
+3
-6
3 additions, 6 deletions
src/main/AndroidManifest.xml
src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java
+11
-1
11 additions, 1 deletion
...tificationFramework/stimulusStrategy/SigMotionDetect.java
with
14 additions
and
7 deletions
src/main/AndroidManifest.xml
+
3
−
6
View file @
d2d2a10b
...
...
@@ -16,11 +16,12 @@
android:roundIcon=
"@mipmap/ic_launcher_round"
android:supportsRtl=
"true"
android:theme=
"@style/AppTheme"
>
<meta-data
android:name=
"com.google.android.awareness.API_KEY"
android:value=
"AIzaSyDqliqBcEQQAvMZR-RengdLUJaAYeRKbgs"
/>
<activity
android:name=
"com.notificationFramework.sedentary.frontEnd.MainActivity"
>
<intent-filter>
<action
android:name=
"android.intent.action.MAIN"
/>
<category
android:name=
"android.intent.category.LAUNCHER"
/>
</intent-filter>
</activity>
...
...
@@ -56,9 +57,5 @@
</action>
</intent-filter>
</receiver>
<meta-data
android:name=
"com.google.android.awareness.API_KEY"
android:value=
"AIzaSyDRgsg2n4oPOSRGZ5qYb1QCAeADwoVC0lA"
>
</meta-data>
</application>
</manifest>
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/main/java/com/notificationFramework/stimulusStrategy/SigMotionDetect.java
+
11
−
1
View file @
d2d2a10b
...
...
@@ -272,8 +272,9 @@ public class SigMotionDetect extends Service implements StimulusStrategy {
lbm
.
sendBroadcast
(
i
);
}
private
void
getExtraData
(){
SharedPreferences
preferences
=
this
.
getSharedPreferences
(
getString
(
R
.
string
.
preference_file_key
),
Context
.
MODE_PRIVATE
);
try
{
double
latitude
=
Awareness
.
getSnapshotClient
(
this
).
getLocation
()
.
getResult
().
getLocation
().
getLatitude
();
...
...
@@ -283,11 +284,20 @@ public class SigMotionDetect extends Service implements StimulusStrategy {
.
getPlaces
().
getResult
().
getPlaceLikelihoods
();
Weather
weather
=
Awareness
.
getSnapshotClient
(
this
).
getWeather
().
getResult
()
.
getWeather
();
SharedPreferences
.
Editor
editor
=
preferences
.
edit
();
editor
.
putLong
(
this
.
getString
(
R
.
string
.
store_lat
),
Double
.
doubleToLongBits
(
latitude
));
editor
.
putLong
(
this
.
getString
(
R
.
string
.
store_long
),
Double
.
doubleToLongBits
(
longitude
));
editor
.
putString
(
this
.
getString
(
R
.
string
.
store_place
),
String
.
valueOf
(
placeLikelihoods
.
get
(
0
).
getPlace
().
getName
()));
editor
.
putFloat
(
this
.
getString
(
R
.
string
.
store_placelike
),
placeLikelihoods
.
get
(
0
).
getLikelihood
());
editor
.
putFloat
(
this
.
getString
(
R
.
string
.
store_temp
),
weather
.
getTemperature
(
Weather
.
CELSIUS
));
editor
.
commit
();
SaveFile
.
recordData
(
latitude
,
longitude
,
placeLikelihoods
,
weather
,
this
);
}
catch
(
SecurityException
e
){
Intent
i
=
new
Intent
(
this
,
RequestPermission
.
class
);
startActivity
(
i
);
}
}
/**
* The method which reponds to a bind request for this service.
*
...
...
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