Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cordova-plugin-background-geolocation
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Aksimaya
cordova-plugin-background-geolocation
Commits
a7cecd95
Commit
a7cecd95
authored
Apr 02, 2014
by
Chris Scott
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16 from Tarangp/master
Updates to be less verbose in non debug mode
parents
2d69f9e5
b02eaf06
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
LocationUpdateService.java
src/android/LocationUpdateService.java
+10
-3
No files found.
src/android/LocationUpdateService.java
View file @
a7cecd95
...
...
@@ -221,7 +221,9 @@ public class LocationUpdateService extends Service implements LocationListener {
public
boolean
stopService
(
Intent
intent
)
{
Log
.
i
(
TAG
,
"- Received stop: "
+
intent
);
cleanUp
();
Toast
.
makeText
(
this
,
"Background location tracking stopped"
,
Toast
.
LENGTH_SHORT
).
show
();
if
(
isDebugging
)
{
Toast
.
makeText
(
this
,
"Background location tracking stopped"
,
Toast
.
LENGTH_SHORT
).
show
();
}
return
super
.
stopService
(
intent
);
}
...
...
@@ -478,9 +480,14 @@ public class LocationUpdateService extends Service implements LocationListener {
if
(
isMoving
)
{
return
;
}
startTone
(
"beep"
);
if
(
isDebugging
)
{
startTone
(
"beep"
);
}
float
distance
=
location
.
distanceTo
(
stationaryLocation
)
-
stationaryLocation
.
getAccuracy
()
-
location
.
getAccuracy
();
Toast
.
makeText
(
this
,
"Stationary exit in "
+
(
stationaryRadius
-
distance
)
+
"m"
,
Toast
.
LENGTH_LONG
).
show
();
if
(
isDebugging
)
{
Toast
.
makeText
(
this
,
"Stationary exit in "
+
(
stationaryRadius
-
distance
)
+
"m"
,
Toast
.
LENGTH_LONG
).
show
();
}
// TODO http://www.cse.buffalo.edu/~demirbas/publications/proximity.pdf
// determine if we're almost out of stationary-distance and increase monitoring-rate.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment