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
c57ae948
Commit
c57ae948
authored
Sep 27, 2013
by
Chris Scott
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
STandardize plugin arch based upon existing cordova plugins
parent
8fa3d817
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
16 deletions
+40
-16
plugin.xml
plugin.xml
+13
-3
BackgroundGeoLocation.js
www/ios/BackgroundGeoLocation.js
+27
-13
No files found.
plugin.xml
View file @
c57ae948
...
@@ -8,16 +8,22 @@
...
@@ -8,16 +8,22 @@
<license>
MIT
</license>
<license>
MIT
</license>
<keywords>
phonegap,background geolocation
</keywords>
<keywords>
phonegap,background geolocation
</keywords>
<engines>
<engine
name=
"cordova"
version=
">=3.0.0"
/>
</engines>
<!-- android -->
<!-- android -->
<platform
name=
"android"
>
<platform
name=
"android"
>
<config-file
target=
"res/xml/config.xml"
parent=
"/*"
>
<config-file
target=
"res/xml/config.xml"
parent=
"/*"
>
<feature
name=
"BackgroundGeoLocation"
>
<feature
name=
"BackgroundGeoLocation"
>
<param
name=
"android-package"
value=
"org.transistorsoft.cordova.background
-
geolocation"
/>
<param
name=
"android-package"
value=
"org.transistorsoft.cordova.backgroundgeolocation"
/>
</feature>
</feature>
</config-file>
</config-file>
<source-file
src=
"src/android/CDVBackgroundGeoLocation.java"
target-dir=
"src/org/transistorsoft/background-geolocation"
/>
<source-file
src=
"src/android/CDVBackgroundGeoLocation.java"
target-dir=
"src/org/transistorsoft/background-geolocation"
/>
<asset
src=
"www/android/BackgroundGeoLocation.js"
target=
"plugins/BackgroundGeoLocation.js"
/>
<js-module
src=
"www/android/BackgroundGeoLocation.js"
name=
"BackgroundGeoLocation"
>
<clobbers
target=
"cordova.plugins.backgroundGeoLocation"
/>
</js-module>
</platform>
</platform>
...
@@ -30,7 +36,11 @@
...
@@ -30,7 +36,11 @@
<source-file
src=
"src/ios/CDVBackgroundGeoLocation.m"
target-dir=
"src/org/transistorsoft/background-geolocation"
/>
<source-file
src=
"src/ios/CDVBackgroundGeoLocation.m"
target-dir=
"src/org/transistorsoft/background-geolocation"
/>
<source-file
src=
"src/ios/CDVBackgroundGeoLocation.h"
target-dir=
"src/org/transistorsoft/background-geolocation"
/>
<source-file
src=
"src/ios/CDVBackgroundGeoLocation.h"
target-dir=
"src/org/transistorsoft/background-geolocation"
/>
<asset
src=
"www/ios/BackgroundGeoLocation.js"
target=
"plugins/BackgroundGeoLocation.js"
/>
<js-module
src=
"www/ios/BackgroundGeoLocation.js"
name=
"BackgroundGeoLocation"
>
<clobbers
target=
"cordova.plugins.backgroundGeoLocation"
/>
</js-module>
</platform>
</platform>
</plugin>
</plugin>
\ No newline at end of file
www/ios/BackgroundGeoLocation.js
View file @
c57ae948
/**
/**
*
* Custom Cordova Background GeoLocation plugin. Uses iOS native API
* Custom Cordova Background GeoLocation plugin. Uses iOS native API
* @author <chris@transistorsoft.com>
* @author <chris@transistorsoft.com>
* Largely based upon http://www.mindsizzlers.com/2011/07/ios-background-location/
* Largely based upon http://www.mindsizzlers.com/2011/07/ios-background-location/
*/
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
cordova
.
define
(
"
org.transistorsoft.cordova.background-geolocation
"
,
function
(
require
,
exports
,
module
)
{
var
exec
=
require
(
'
cordova/exec
'
);
;(
function
(){
/**
var
BackgroundGeoLocation
=
function
()
{}
* Provides access to the vibration mechanism on the device.
*/
BackgroundGeoLocation
.
prototype
=
{
module
.
exports
=
{
/**
/**
* Configure the native API with our authentication-token and url to POST locations to
* Configure the native API with our authentication-token and url to POST locations to
* TODO Native plugin assumes the json-structure as required by our rails server
* TODO Native plugin assumes the json-structure as required by our rails server
...
@@ -44,12 +65,5 @@
...
@@ -44,12 +65,5 @@
fail
=
(
typeof
(
fail
)
===
'
function
'
)
?
fail
:
function
()
{};
fail
=
(
typeof
(
fail
)
===
'
function
'
)
?
fail
:
function
()
{};
return
Cordova
.
exec
(
success
,
fail
,
"
BackgroundGeoLocation
"
,
"
stop
"
,
[
options
]);
return
Cordova
.
exec
(
success
,
fail
,
"
BackgroundGeoLocation
"
,
"
stop
"
,
[
options
]);
}
}
};
// remove Cordova.addConstructor since it was not supported on PhoneGap 2.0
if
(
!
window
.
plugins
)
window
.
plugins
=
{};
if
(
!
window
.
plugins
.
BackgroundGeoLocation
)
{
window
.
plugins
.
BackgroundGeoLocation
=
new
BackgroundGeoLocation
();
}
}
})
()
;
});
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