diff --git a/CHANGELOG.md b/CHANGELOG.md index a5bd43e..0664cc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +# 0.5.8 / 2019-03-29 + +* fix for low memory devices + # 0.5.7 / 2018-05-29 -* fixed support for Android 8 \ No newline at end of file +* fixed support for Android 8 diff --git a/package.json b/package.json index c81f8cc..ca80056 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cordova-instagram-plugin", - "version": "0.5.7", + "version": "0.5.8", "description": "Share the content of a canvas element or a dataUrl encoded image using the Instagram application for iOS and Android.", "cordova": { "id": "cordova-instagram-plugin", diff --git a/plugin.xml b/plugin.xml index e96b725..802dd43 100644 --- a/plugin.xml +++ b/plugin.xml @@ -2,7 +2,7 @@ + version="0.5.8"> Instagram diff --git a/src/android/CDVInstagramPlugin.java b/src/android/CDVInstagramPlugin.java index ad99dc8..628a835 100644 --- a/src/android/CDVInstagramPlugin.java +++ b/src/android/CDVInstagramPlugin.java @@ -151,10 +151,14 @@ private void share(String imageString, String captionString) { public void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == Activity.RESULT_OK) { Log.v("Instagram", "shared ok"); - this.cbContext.success(); + if(this.cbContext != null) { + this.cbContext.success(); + } } else if (resultCode == Activity.RESULT_CANCELED) { Log.v("Instagram", "share cancelled"); - this.cbContext.error("Share Cancelled"); + if(this.cbContext != null) { + this.cbContext.error("Share Cancelled"); + } } } }