Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EmailComposer issue #168

Closed
Langstra opened this issue May 20, 2016 · 6 comments
Closed

EmailComposer issue #168

Langstra opened this issue May 20, 2016 · 6 comments

Comments

@Langstra
Copy link

Langstra commented May 20, 2016

There are four issues I found when using the EmailComposer plugin.

  1. The documentation says that there is a function EmailComposter.send(), this should be open.
  2. EmailComposer.isAvailable() always returns false, even though inbox and gmail are installed and configured.
  3. EmailComposer.open() does not do anything, no mail application is opened.
  4. The Email type cannot be imported, or at least it is not described how to do this.

I created a demo to show the issue:
https://github.com/Langstra/ionicNativeDemo

ihadeed added a commit that referenced this issue May 20, 2016
function now returns a promise that resolves if email composer is available, and rejects if it's not

partially fixes #168
@ihadeed
Copy link
Collaborator

ihadeed commented May 20, 2016

Hey @Langstra

Thanks for pointing out these issues. I applied some changes and will go ahead and test them now.

The Email type can be imported by using the following line:
import {Email} from 'ionic-native/dist/plugins/emailcomposer';

Note that after the recent changes are published, you have to import it from ionic-native/dist/plugins/types/email

@ihadeed
Copy link
Collaborator

ihadeed commented May 20, 2016

@Langstra I just tested the plugin on my Android Lolipop device.

The wrappers are working correctly now. However, the plugin itself isn't functioning properly (at least on my device?)

@Langstra
Copy link
Author

Langstra commented May 21, 2016

I will test it as well and if necessary create an issue at the page of the plugin itself. Thank for looking into it so quickly.

@Langstra
Copy link
Author

By looking at the source of emailcomposer.js and looking at

EmailComposer.open = function (email, scope) { 
        return; 
    };

it does not return anything, correct?

@Langstra
Copy link
Author

Langstra commented May 21, 2016

@ihadeed I tested the wrapper some more and I found that the isAvailable() function gives an error when calling it. The error is because of the plugin itself you think?

EXCEPTION: Error: Uncaught (in promise): undefined
app.bundle.js:33679 EXCEPTION: Error: Uncaught (in promise): undefinedBrowserDomAdapter.logError @ app.bundle.js:33679BrowserDomAdapter.logGroup @ app.bundle.js:33689ExceptionHandler.call @ app.bundle.js:1523(anonymous function) @ app.bundle.js:20207schedulerFn @ app.bundle.js:1018SafeSubscriber.__tryOrUnsub @ app.bundle.js:75806SafeSubscriber.next @ app.bundle.js:75755Subscriber._next @ app.bundle.js:75705Subscriber.next @ app.bundle.js:75669Subject._finalNext @ app.bundle.js:75461Subject._next @ app.bundle.js:75453Subject.next @ app.bundle.js:75410EventEmitter.emit @ app.bundle.js:1007NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ app.bundle.js:30316NgZoneImpl.inner.inner.fork.onHandleError @ app.bundle.js:30508ZoneDelegate.handleError @ zone.js:327Zone.runGuarded @ zone.js:233_loop_1 @ zone.js:487drainMicroTaskQueue @ zone.js:494
app.bundle.js:33679 STACKTRACE:BrowserDomAdapter.logError @ app.bundle.js:33679ExceptionHandler.call @ app.bundle.js:1525(anonymous function) @ app.bundle.js:20207schedulerFn @ app.bundle.js:1018SafeSubscriber.__tryOrUnsub @ app.bundle.js:75806SafeSubscriber.next @ app.bundle.js:75755Subscriber._next @ app.bundle.js:75705Subscriber.next @ app.bundle.js:75669Subject._finalNext @ app.bundle.js:75461Subject._next @ app.bundle.js:75453Subject.next @ app.bundle.js:75410EventEmitter.emit @ app.bundle.js:1007NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ app.bundle.js:30316NgZoneImpl.inner.inner.fork.onHandleError @ app.bundle.js:30508ZoneDelegate.handleError @ zone.js:327Zone.runGuarded @ zone.js:233_loop_1 @ zone.js:487drainMicroTaskQueue @ zone.js:494
app.bundle.js:33679 Error: Uncaught (in promise): undefined
    at resolvePromise (zone.js:538)
    at resolvePromise (zone.js:523)
    at zone.js:571
    at ZoneDelegate.invokeTask (zone.js:356)
    at Object.NgZoneImpl.inner.inner.fork.onInvokeTask (app.bundle.js:30478)
    at ZoneDelegate.invokeTask (zone.js:355)
    at Zone.runTask (zone.js:256)
    at drainMicroTaskQueue (zone.js:474)BrowserDomAdapter.logError @ app.bundle.js:33679
ExceptionHandler.call @ app.bundle.js:1526
(anonymous function) @ app.bundle.js:20207
schedulerFn @ app.bundle.js:1018
SafeSubscriber.__tryOrUnsub @ app.bundle.js:75806
SafeSubscriber.next @ app.bundle.js:75755
Subscriber._next @ app.bundle.js:75705
Subscriber.next @ app.bundle.js:75669
Subject._finalNext @ app.bundle.js:75461
Subject._next @ app.bundle.js:75453
Subject.next @ app.bundle.js:75410
EventEmitter.emit @ app.bundle.js:1007
NgZone._zoneImpl.ng_zone_impl_1.NgZoneImpl.onError @ app.bundle.js:30316
NgZoneImpl.inner.inner.fork.onHandleError @ app.bundle.js:30508
ZoneDelegate.handleError @ zone.js:327
Zone.runGuarded @ zone.js:233
_loop_1 @ zone.js:487
drainMicroTaskQueue @ zone.js:494
zone.js:463 Error: Uncaught (in promise): undefined(…)consoleError @ zone.js:463
_loop_1 @ zone.js:490
drainMicroTaskQueue @ zone.js:494

The open function does not appear to be called at all. I inserted console.log() at the beginning of the function in email-composer.js, but it never appeared in my console.

@ihadeed
Copy link
Collaborator

ihadeed commented May 21, 2016

@Langstra I'm going to open an issue with the developer and see if they can alter the implementation and fix the issues there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants