Skip to content

Commit

Permalink
Merge pull request #20 from vip-git/android-context-fix
Browse files Browse the repository at this point in the history
Android Runtime issues resolved
  • Loading branch information
EddyVerbruggen authored Jul 27, 2017
2 parents 90a5238 + 56a0103 commit 9f7e55c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions email.android.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ var fs = require("file-system");
exports.available = function () {
return new Promise(function (resolve, reject) {
try {
var uri = android.net.Uri.fromParts("mailto", "[email protected]", null);
var uri = android.net.Uri.fromParts("mailto", "", null);
var intent = new android.content.Intent(android.content.Intent.ACTION_SENDTO, uri);
var packageManager = com.tns.NativeScriptApplication.getInstance().getPackageManager();
var packageManager = application.android.context.getPackageManager();
var nrOfMailApps = packageManager.queryIntentActivities(intent, 0).size();
resolve(nrOfMailApps > 0);
} catch (ex) {
Expand Down Expand Up @@ -184,4 +184,4 @@ var toStringArray = function (arg) {
arr[i] = arg[i];
}
return arr;
};
};
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-email",
"version": "1.4.1",
"version": "1.4.2",
"description": "Email plugin for your NativeScript app",
"main": "email",
"typings": "email.d.ts",
Expand Down

0 comments on commit 9f7e55c

Please sign in to comment.