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
14acd263
Commit
14acd263
authored
Feb 06, 2014
by
Chris Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only nullify stationary-region when isMoving
parent
ce3a6c7c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
CDVBackgroundGeoLocation.m
src/ios/CDVBackgroundGeoLocation.m
+8
-5
No files found.
src/ios/CDVBackgroundGeoLocation.m
View file @
14acd263
...
...
@@ -138,6 +138,9 @@
UIApplicationState
state
=
[[
UIApplication
sharedApplication
]
applicationState
];
if
(
state
==
UIApplicationStateBackground
)
{
[
self
setPace
:
isMoving
];
if
(
!
isMoving
)
{
[
self
startMonitoringStationaryRegion
:[
locationManager
location
]];
}
}
}
/**
...
...
@@ -278,13 +281,13 @@
*/
-
(
void
)
setPace
:(
BOOL
)
value
{
NSLog
(
@"- CDVBackgroundGeoLocation setPace %d
"
,
value
);
NSLog
(
@"- CDVBackgroundGeoLocation setPace %d
, myRegion? %d"
,
value
,
myRegion
!=
nil
);
isMoving
=
value
;
if
(
value
==
YES
)
{
if
(
myRegion
!=
nil
)
{
[
locationManager
stopMonitoringForRegion
:
myRegion
];
myRegion
=
nil
;
}
if
(
value
==
YES
)
{
[
locationManager
stopMonitoringSignificantLocationChanges
];
[
locationManager
startUpdatingLocation
];
}
else
{
...
...
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