forked from jefflinwood/cordova-plugin-twiliovoicesdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.xml
175 lines (139 loc) · 7.75 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
<?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="com.phonegap.plugins.twiliovoice"
version="2.0.0">
<name>TwilioVoice</name>
<description>Use the Twilio Voice SDK for iOS or Android with Cordova/PhoneGap. Successor to Twilio Client Plugin</description>
<author>Jeff Linwood/Stevie Graham/Lyle Pratt</author>
<license>MIT</license>
<asset src="www/TwilioVoicePlugin.js" target="js/TwilioVoicePlugin.js" />
<engines>
<engine name="cordova" version=">=6.4.0"/>
<engine name="cordova-android" version=">=6.0.0"/>
<engine name="cordova-ios" version=">=4.3.0"/>
</engines>
<!-- Necessary for Android Push notification support with GCM for Twilio Voice -->
<preference name="GCM_SENDER_ID" default=""/>
<!-- Necessary to set app name for incoming call notifications on Android and CallKit on iOS -->
<preference name="INCOMING_CALL_APP_NAME" default=""/>
<!-- Necessary to enable CallKit on iOS -->
<preference name="ENABLE_CALL_KIT" default="false"/>
<!-- Option to mask the incoming phone number for privacy -->
<preference name="MASK_INCOMING_PHONE_NUMBER" default="false"/>
<!-- android -->
<platform name="android">
<config-file target="AndroidManifest.xml" parent="/manifest">
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" />
<permission android:name="$PACKAGE_NAME.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
</config-file>
<dependency id="phonegap-plugin-push"/>
<config-file target="AndroidManifest.xml" parent="/manifest/application">
<receiver android:name="com.phonegap.plugins.twiliovoice.BootCompletedReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
</intent-filter>
</receiver>
<service
android:name="com.phonegap.plugins.twiliovoice.gcm.VoiceGCMListenerService"
android:exported="false">
<intent-filter android:priority="999">
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</service>
<service
android:name="com.phonegap.plugins.twiliovoice.gcm.VoiceInstanceIDListenerService"
android:exported="false">
<intent-filter>
<action android:name="com.google.android.gms.iid.InstanceID" />
</intent-filter>
</service>
<service
android:name="com.phonegap.plugins.twiliovoice.gcm.GCMRegistrationService"
android:exported="false"></service>
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</config-file>
<config-file target="res/xml/config.xml" parent="/widget">
<feature name="TwilioVoicePlugin">
<param name="android-package" value="com.phonegap.plugins.twiliovoice.TwilioVoicePlugin"/>
</feature>
</config-file>
<config-file target="res/values/strings.xml" parent="/resources">
<string name="gcm_sender_id" translatable="false">$GCM_SENDER_ID</string>
<string name="incoming_call_app_name" translatable="false">$INCOMING_CALL_APP_NAME</string>
</config-file>
<framework src="com.google.android.gms:play-services-gcm:9.4.0" />
<framework src="com.twilio:voice-android:2.0.0-beta4"/>
<source-file src="src/android/com/phonegap/plugins/twiliovoice/TwilioVoicePlugin.java"
target-dir="src/com/phonegap/plugins/twiliovoice" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/SoundPoolManager.java"
target-dir="src/com/phonegap/plugins/twiliovoice" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/BootCompletedReceiver.java"
target-dir="src/com/phonegap/plugins/twiliovoice" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/gcm/GcmReceiver.java"
target-dir="src/com/phonegap/plugins/twiliovoice/gcm" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/gcm/GCMRegistrationService.java"
target-dir="src/com/phonegap/plugins/twiliovoice/gcm" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/gcm/VoiceGCMListenerService.java"
target-dir="src/com/phonegap/plugins/twiliovoice/gcm" />
<source-file src="src/android/com/phonegap/plugins/twiliovoice/gcm/VoiceInstanceIDListenerService.java"
target-dir="src/com/phonegap/plugins/twiliovoice/gcm" />
<source-file src="sounds/ringing.wav" target-dir="res/raw"/>
<source-file src="sounds/traditionalring.mp3" target-dir="res/raw"/>
</platform>
<!-- ios -->
<platform name="ios">
<!-- Add the Twilio Voice plugin to the iOS app's config.xml -->
<config-file target="config.xml" parent="widget">
<feature name="TwilioVoicePlugin">
<param name="ios-package"
value="TwilioVoicePlugin"/>
</feature>
</config-file>
<!-- <framework src="TwilioVoiceClient" type="podspec" spec="=2.0.0-beta6" /> -->
<!-- Add support for background VOIP and audio to the plist -->
<config-file target="*-Info.plist" parent="UIBackgroundModes">
<array>
<string>voip</string>
<string>audio</string>
</array>
</config-file>
<!-- Add Privacy Description for Microphone Usage -->
<config-file target="*-Info.plist" parent="NSMicrophoneUsageDescription">
<string>The app uses the microphone for voice calls</string>
</config-file>
<!-- Add Incoming Call App Name for CallKit -->
<config-file target="*-Info.plist" parent="TVPIncomingCallAppName">
<string>$INCOMING_CALL_APP_NAME</string>
</config-file>
<!-- Add Enable CallKit Preference to plist -->
<config-file target="*-Info.plist" parent="TVPEnableCallKit">
<string>$ENABLE_CALL_KIT</string>
</config-file>
<!-- Add Enable CallKit Preference to plist -->
<config-file target="*-Info.plist" parent="TVPMaskIncomingPhoneNumber">
<string>$MASK_INCOMING_PHONE_NUMBER</string>
</config-file>
<!-- Add push entitlements -->
<config-file target="*/Entitlements-Debug.plist" parent="aps-environment">
<string>development</string>
</config-file>
<config-file target="*/Entitlements-Release.plist" parent="aps-environment">
<string>production</string>
</config-file>
<header-file src="src/ios/TwilioVoicePlugin.h" />
<source-file src="src/ios/TwilioVoicePlugin.m" />
<resource-file src="sounds/ringing.wav" />
<resource-file src="sounds/traditionalring.mp3" />
<info>
You need to download __Twilio Voice SDK for iOS__ from https://media.twiliocdn.com/sdk/ios/voice/releases/2.0.1/twilio-voice-ios-2.0.1.tar.bz2. Uncompress the download - you will need to follow two steps that plugman can not do yet:
* Add the Twilio Voice framework (TwilioVoice.framework) to your Xcode project
* Add the Twilio Voice framework (TwilioVoice.framework) as an embedded binary to your Xcode project
</info>
</platform>
</plugin>