-
Notifications
You must be signed in to change notification settings - Fork 99
/
plugin.xml
executable file
·87 lines (69 loc) · 4.04 KB
/
plugin.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="UTF-8"?>
<plugin xmlns="http://www.phonegap.com/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.flybuy.cordova.background-location-services"
version="1.1.1">
<name>CDVBackgroundLocationServices</name>
<description>Background Location Services For Cordova</description>
<license>MIT</license>
<keywords></keywords>
<engines>
<engine name="cordova" version=">=3.0.0"/>
</engines>
<js-module src="www/BackgroundLocationServices.js" name="BackgroundLocationServices">
<clobbers target="plugins.backgroundLocationServices"/>
</js-module>
<!-- android -->
<platform name="android">
<framework src="com.google.android.gms:play-services-location:+" />
<source-file src="src/android/BackgroundLocationServicesPlugin.java" target-dir="src/com/flybuy/cordova/location"/>
<source-file src="src/android/BackgroundLocationUpdateService.java" target-dir="src/com/flybuy/cordova/location"/>
<source-file src="src/android/PermissionHelper.java" target-dir="src/com/flybuy/cordova/location"/>
<source-file src="src/android/Constants.java" target-dir="src/com/flybuy/cordova/location"/>
<source-file src="src/android/location_icon.png" target-dir="res/drawable"/>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version"/>
<service android:name="com.flybuy.cordova.location.BackgroundLocationUpdateService" android:enabled="true"/>
</config-file>
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="com.google.android.gms.permission.ACTIVITY_RECOGNITION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
</config-file>
<config-file target="res/xml/config.xml" parent="/*">
<feature name="BackgroundLocationServices">
<param name="android-package" value="com.flybuy.cordova.location.BackgroundLocationServicesPlugin"/>
</feature>
</config-file>
</platform>
<platform name="ios">
<!-- required background modes: App registers for location updates -->
<hook type="after_plugin_install" src="hooks/add_swift_support.js"/>
<hook type="after_platform_add" src="hooks/add_swift_support.js"/>
<config-file target="*-Info.plist" parent="NSLocationAlwaysUsageDescription">
<string>${EXECUTABLE_NAME} Would Like to Use Your Current Location Even In Background.</string>
</config-file>
<!-- Usage description of Motion, mandatory since iOS 10 -->
<config-file target="*-Info.plist" parent="NSMotionUsageDescription">
<string>${EXECUTABLE_NAME} Would Like to Use Motion Data.</string>
</config-file>
<config-file target="*-Info.plist" parent="UIBackgroundModes">
<array>
<string>location</string>
</array>
</config-file>
<config-file target="config.xml" parent="/*">
<feature name="BackgroundLocationServices">
<param name="ios-package" value="BackgroundLocationServices"/>
</feature>
</config-file>
<header-file src="src/ios/Loc-Bridging-Header.h"/>
<source-file src="src/ios/CDVBackgroundLocationServices.swift"/>
<framework src="AudioToolbox.framework" weak="true"/>
<framework src="AVFoundation.framework" weak="true"/>
</platform>
</plugin>