pushwoosh-cordova-plugin 8.3.56 → 8.3.58
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/example_voip/LICENSE +21 -0
- package/example_voip/README.md +156 -0
- package/example_voip/Screenshots/Android.png +0 -0
- package/example_voip/Screenshots/iOS.png +0 -0
- package/example_voip/Screenshots/xcode_appgroups.png +0 -0
- package/example_voip/demovoip/README.md +181 -0
- package/example_voip/demovoip/config.xml +22 -0
- package/example_voip/demovoip/google-services.json +86 -0
- package/example_voip/demovoip/hooks/after_platform_add/010_install_plugin.js +46 -0
- package/example_voip/demovoip/hooks/after_prepare/010_setup_gradle_wrapper.js +34 -0
- package/example_voip/demovoip/hooks/after_prepare/015_fix_agp_version.js +36 -0
- package/example_voip/demovoip/hooks/after_prepare/020_copy_google_services.js +23 -0
- package/example_voip/demovoip/hooks/after_prepare/025_add_voip_pod.js +43 -0
- package/example_voip/demovoip/hooks/after_prepare.js +28 -0
- package/example_voip/demovoip/package-lock.json +1104 -0
- package/example_voip/demovoip/package.json +34 -0
- package/example_voip/demovoip/www/css/index.css +605 -0
- package/example_voip/demovoip/www/img/logo.png +0 -0
- package/example_voip/demovoip/www/index.html +175 -0
- package/example_voip/demovoip/www/js/index.js +419 -0
- package/package.json +1 -1
- package/plugin.xml +10 -10
- package/src/android/add-android-voip.gradle +1 -1
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/CallsAdapter.java +0 -1
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/NoopCallsAdapter.java +0 -5
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/PushNotifications.java +2 -7
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/calls/PushwooshCallsAdapter.java +0 -14
- package/src/ios/PushNotification.m +0 -5
- package/types/PushNotification.d.ts +0 -1
- package/www/PushNotification.js +0 -4
|
@@ -1088,19 +1088,14 @@ public class PushNotifications extends CordovaPlugin {
|
|
|
1088
1088
|
@CordovaMethod
|
|
1089
1089
|
private boolean setApiToken(JSONArray data, final CallbackContext callbackContext) {
|
|
1090
1090
|
try {
|
|
1091
|
-
String
|
|
1092
|
-
Pushwoosh.getInstance().
|
|
1091
|
+
String apiToken = data.getString(0);
|
|
1092
|
+
Pushwoosh.getInstance().setApiToken(apiToken);
|
|
1093
1093
|
} catch (JSONException e) {
|
|
1094
1094
|
PWLog.error(TAG, "No parameters passed (missing parameters)", e);
|
|
1095
1095
|
}
|
|
1096
1096
|
return true;
|
|
1097
1097
|
}
|
|
1098
1098
|
|
|
1099
|
-
@CordovaMethod
|
|
1100
|
-
private boolean setVoipAppCode(JSONArray data, CallbackContext callbackContext) {
|
|
1101
|
-
return callsAdapter.setVoipAppCode(data, callbackContext);
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
1099
|
@CordovaMethod
|
|
1105
1100
|
private boolean requestCallPermission(JSONArray data, final CallbackContext callbackContext) {
|
|
1106
1101
|
return callsAdapter.requestCallPermission(data, callbackContext);
|
package/src/android/src/com/pushwoosh/plugin/pushnotifications/calls/PushwooshCallsAdapter.java
CHANGED
|
@@ -8,7 +8,6 @@ import android.content.Intent;
|
|
|
8
8
|
import android.media.AudioManager;
|
|
9
9
|
import android.os.Bundle;
|
|
10
10
|
|
|
11
|
-
import com.pushwoosh.Pushwoosh;
|
|
12
11
|
import com.pushwoosh.calls.CallPermissionsCallback;
|
|
13
12
|
import com.pushwoosh.calls.PushwooshCallReceiver;
|
|
14
13
|
import com.pushwoosh.calls.PushwooshCallSettings;
|
|
@@ -28,19 +27,6 @@ import java.util.ArrayList;
|
|
|
28
27
|
public class PushwooshCallsAdapter implements CallsAdapter {
|
|
29
28
|
public static final String TAG = "PushwooshCallsAdapter";
|
|
30
29
|
|
|
31
|
-
@Override
|
|
32
|
-
public boolean setVoipAppCode(JSONArray data, CallbackContext callbackContext) {
|
|
33
|
-
PWLog.noise(TAG, "setVoipAppCode()");
|
|
34
|
-
try {
|
|
35
|
-
String appCode = data.getString(0);
|
|
36
|
-
Pushwoosh.getInstance().addAlternativeAppCode(appCode);
|
|
37
|
-
} catch (JSONException e) {
|
|
38
|
-
PWLog.error(TAG, "No parameters passed (missing parameters)", e);
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
return true;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
30
|
@Override
|
|
45
31
|
public boolean requestCallPermission(JSONArray data, final CallbackContext callbackContext) {
|
|
46
32
|
PWLog.noise(TAG, "requestCallPermission()");
|
|
@@ -643,11 +643,6 @@ API_AVAILABLE(ios(10.0)) {
|
|
|
643
643
|
//stub, android only
|
|
644
644
|
}
|
|
645
645
|
|
|
646
|
-
- (void)setVoipAppCode:(CDVInvokedUrlCommand *)command {
|
|
647
|
-
NSString *voipAppCode = command.arguments[0];
|
|
648
|
-
[PushwooshVoIPImplementation setPushwooshVoIPAppId:voipAppCode];
|
|
649
|
-
}
|
|
650
|
-
|
|
651
646
|
// MARK: - VoIP, CallKit callbacks
|
|
652
647
|
- (void)receiveCallFromRecents:(NSNotification *) notification {
|
|
653
648
|
NSString* callID = notification.object[@"callId"];
|
|
@@ -89,7 +89,6 @@ export interface PushNotification {
|
|
|
89
89
|
registerSMSNumber(phoneNumber: string, success?: () => void, fail?: (error: Error|string) => void): void;
|
|
90
90
|
registerWhatsappNumber(phoneNumber: string, success?: () => void, fail?: (error: Error|string) => void): void;
|
|
91
91
|
setApiToken(apiToken: string): void;
|
|
92
|
-
setVoipAppCode(appCode: string): void;
|
|
93
92
|
registerEvent(eventName: string, success: (...args: any[]) => void, fail?: (error?: Error | string) => void): void;
|
|
94
93
|
initializeVoIPParameters(supportsVideo?: boolean, ringtoneSound?: string, handleTypes?: number, success?: () => void, error?: (err: Error | string) => void): void;
|
|
95
94
|
speakerOn(success?: () => void, error?: (err: Error | string) => void): void;
|
package/www/PushNotification.js
CHANGED
|
@@ -831,10 +831,6 @@ PushNotification.prototype.setApiToken = function(token) {
|
|
|
831
831
|
exec(null, null, "PushNotification", "setApiToken", [token]);
|
|
832
832
|
}
|
|
833
833
|
|
|
834
|
-
PushNotification.prototype.setVoipAppCode = function(appCode) {
|
|
835
|
-
exec(null, null, "PushNotification", "setVoipAppCode", [appCode]);
|
|
836
|
-
}
|
|
837
|
-
|
|
838
834
|
PushNotification.prototype.setIncomingCallTimeout = function(timeoutSeconds) {
|
|
839
835
|
exec(null, null, "PushNotification", "setIncomingCallTimeout", [timeoutSeconds]);
|
|
840
836
|
}
|