pushwoosh-cordova-plugin 8.3.55 → 8.3.57
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 +12 -9
- 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 +123 -42
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/VoIPEventStorage.java +130 -0
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/calls/PWCordovaCallEventListener.java +61 -34
- package/src/android/src/com/pushwoosh/plugin/pushnotifications/calls/PushwooshCallsAdapter.java +18 -13
- package/src/ios/PushNotification.m +0 -5
- package/types/PushNotification.d.ts +0 -1
- package/www/PushNotification.js +0 -4
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
module.exports = function(context) {
|
|
7
|
+
const platforms = context.opts.platforms;
|
|
8
|
+
|
|
9
|
+
if (platforms.indexOf('android') !== -1) {
|
|
10
|
+
const androidPlatformRoot = path.join(context.opts.projectRoot, 'platforms', 'android');
|
|
11
|
+
const localPropertiesPath = path.join(androidPlatformRoot, 'local.properties');
|
|
12
|
+
|
|
13
|
+
// Android SDK path - adjust if needed
|
|
14
|
+
const sdkPath = process.env.ANDROID_HOME ||
|
|
15
|
+
process.env.ANDROID_SDK_ROOT ||
|
|
16
|
+
path.join(process.env.HOME, 'Library', 'Android', 'sdk');
|
|
17
|
+
|
|
18
|
+
const content = `## This file must *NOT* be checked into Version Control Systems,
|
|
19
|
+
# as it contains information specific to your local configuration.
|
|
20
|
+
#
|
|
21
|
+
# Location of the SDK. This is only used by Gradle.
|
|
22
|
+
sdk.dir=${sdkPath}
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
fs.writeFileSync(localPropertiesPath, content, 'utf8');
|
|
26
|
+
console.log('[Hook] Created local.properties with sdk.dir=' + sdkPath);
|
|
27
|
+
}
|
|
28
|
+
};
|