Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cordova-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-background-geolocation
Commits
2bc77307
Commit
2bc77307
authored
Feb 22, 2015
by
Chris Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait until configure before instantiating ToneGenerator
parent
1af4f38b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
BackgroundGeolocationPlugin.java
src/android/BackgroundGeolocationPlugin.java
+5
-5
No files found.
src/android/BackgroundGeolocationPlugin.java
View file @
2bc77307
...
...
@@ -92,10 +92,6 @@ public class BackgroundGeolocationPlugin extends CordovaPlugin implements Locati
// Register for events fired by our IntentService "LocationService"
EventBus
.
getDefault
().
register
(
this
);
if
(
isDebugging
)
{
toneGenerator
=
new
ToneGenerator
(
AudioManager
.
STREAM_NOTIFICATION
,
100
);
}
}
public
boolean
execute
(
String
action
,
JSONArray
data
,
CallbackContext
callbackContext
)
{
...
...
@@ -132,6 +128,10 @@ public class BackgroundGeolocationPlugin extends CordovaPlugin implements Locati
isDebugging
=
config
.
getBoolean
(
"debug"
);
stopOnTerminate
=
config
.
getBoolean
(
"stopOnTerminate"
);
if
(
isDebugging
)
{
toneGenerator
=
new
ToneGenerator
(
AudioManager
.
STREAM_NOTIFICATION
,
100
);
}
this
.
callback
=
callbackContext
;
}
catch
(
JSONException
e
)
{
callbackContext
.
error
(
"Configuration error "
+
e
.
getMessage
());
...
...
@@ -188,7 +188,7 @@ public class BackgroundGeolocationPlugin extends CordovaPlugin implements Locati
}
private
void
setPace
(
Boolean
moving
)
{
if
(
isM
oving
)
{
if
(
m
oving
)
{
LocationRequest
request
=
LocationRequest
.
create
()
.
setPriority
(
translateDesiredAccuracy
(
desiredAccuracy
))
.
setInterval
(
this
.
locationUpdateInterval
)
...
...
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