Skip to content

Commit

Permalink
Update to latest Intercom Android SDK (#330)
Browse files Browse the repository at this point in the history
  • Loading branch information
Br1an-Boyle authored Jun 5, 2024
1 parent 0455839 commit db39bc0
Show file tree
Hide file tree
Showing 15 changed files with 425 additions and 564 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.DS_Store
Example/node_modules
intercom-plugin/node_modules
intercom-cordova.code-workspace
node_modules/*
4 changes: 2 additions & 2 deletions Example/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
<platform name="android">
<allow-intent href="market:*" />
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="33" />
<preference name="android-compileSdkVersion" value="33" />
<preference name="android-targetSdkVersion" value="34" />
<preference name="android-compileSdkVersion" value="34" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity[@android:name='MainActivity']">
<activity android:exported="true" />
</edit-config>
Expand Down
584 changes: 223 additions & 361 deletions Example/package-lock.json

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
"displayName": "Intercom Cordova",
"cordova": {
"platforms": [
"android",
"ios"
"ios",
"android"
],
"plugins": {
"cordova-plugin-intercom": {}
}
},
"dependencies": {
"cordova-android": "^10.1.1",
"cordova-ios": "7.1.0"
"cordova-android": "13.0.0",
"cordova-ios": "^7.1.0"
},
"devDependencies": {
"cordova-plugin-intercom": "file:../intercom-plugin"
Expand Down
9 changes: 4 additions & 5 deletions Example/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ var app = {
// function, we must explicitly call 'app.receivedEvent(...);'
onDeviceReady: function() {
app.receivedEvent('deviceready');

intercom.setLauncherVisibility('VISIBLE');
intercom.setInAppMessageVisibility('VISIBLE');

Expand All @@ -59,14 +58,14 @@ var app = {
}, false);

document.getElementById("open-help-center-btn").addEventListener("click", function(){
intercom.presentSpace(intercom.Space.HelpCenter);
intercom.presentSpace(intercom.space.HelpCenter);
}, false);

document.getElementById("open-help-center-filtered-btn").addEventListener("click", function(){
// Replace this with your own collections
var collectionIds = ["COLLECTION_ID1", "COLLECTION_ID2"];

intercom.displayHelpCenterCollections({collectionIds: ids});
var collectionIds = ["COLLECTION_ID1", "COLLECTION_ID2"];
var helpCenterCollections = intercomContent.helpCenterCollectionsWithIds(collectionIds)
intercom.presentContent(helpCenterCollections)
}, false);

document.getElementById("help-center-data-api-fetch-btn").addEventListener("click", function(){
Expand Down
42 changes: 42 additions & 0 deletions intercom-plugin/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

37 changes: 16 additions & 21 deletions intercom-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
{
"name": "cordova-plugin-intercom",
"version": "13.1.0",
"description": "Official Cordova/PhoneGap plugin for Intercom",
"version": "14.0.0",
"description": "Official Cordova plugin for Intercom",
"author": "Intercom",
"license": "MIT License",
"homepage": "https://github.com/intercom/intercom-cordova#readme",
"cordova": {
"id": "cordova-plugin-intercom",
"platforms": [
Expand All @@ -20,24 +23,16 @@
"cordova-ios",
"cordova-android"
],
"engines": [
{
"name": "cordova",
"version": ">=12.0.0"
},
{
"name": "cordova-android",
"version": ">=13.0.0"
},
{
"name": "cordova-ios",
"version": "7.1.0"
}
],
"author": "Intercom",
"license": "MIT License",
"bugs": {
"url": "https://github.com/intercom/intercom-cordova/issues"
"dependencies": {
"q": "^1.5.1"
},
"homepage": "https://github.com/intercom/intercom-cordova#readme"
"engines": {
"cordovaDependencies": {
"14.0.0": {
"cordova": "=>12.0.0",
"cordova-android": ">=13.0.0",
"cordova-ios": "7.1.0"
}
}
}
}
2 changes: 1 addition & 1 deletion intercom-plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

<engines>
<engine name="cordova" version=">=12.0.0" />
<engine name="cordova-android" version=">=10.0.0" />
<engine name="cordova-android" version=">=13.0.0" />
<engine name="cordova-ios" version="7.1.0" />
</engines>

Expand Down
Loading

0 comments on commit db39bc0

Please sign in to comment.