- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to develop an app and apparently it should trigger an email and I am trying to use Cardova plugin and calling the below two functions and none of them are working, does anybody has any examples, please advise.
window.plugins.emailComposer.showEmailComposerWithCallback
cordova.plugins.email.open
thanks,
RK.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Which plugin are you using?
Here is simple example:
add this as third-party plugin via git url: https://github.com/katzer/cordova-plugin-email-composer
<script> function email(){ cordova.plugins.email.open({ to: 'youremail@gmail.com', subject: 'Greetings', body: 'Hello How are you?' }); } </script> <button onclick="email()">Email</button>
more documentation here:https://github.com/katzer/cordova-plugin-email-composer
you have to build the app and install on device to test, this code works on ios and android
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Rakshith,
First of all , I thank for responding to my problem.
I have copy pasted your code and added the same plugin in and its not working, I am trying to test this functionality using Intel App Preview app and its not working their and do you suggest any other approach to test this functionality, please advise.
Its critical now and appreciate your quick response.
Thanks,
RK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raf -- you cannot test code that uses third-party plugins in App Preview, you need to build the app or use the Debug tab and let it build a custom debug module for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul,
I have started configuring application and started testing in debug mode and I am getting the below error
TypeError: undefined is not an object (evaluating 'cordova.plugins.email')
Can you please help me and this is something urgent for me to complete some prototype.
Thanks,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to use the DEBUG TAB to debug an app that includes third-party apps. The Emulate tab and Test tab will not work for that debugging. See this doc page > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes please, I am using Debug Tab and I am not successful in enabling the capability of sending email can you please advise how to troubleshoot this, this is something urgent for my prototype.
Thanks
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have created the build and deployed then its working , but this is not working in debug tab.
Can you please advise if there is any alternative option not to open email composer and I was looking for functionality to send email with out end user intervention to hit send button again..
Thanks,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Raj -- there are other debug options, it's possible the debug module is not working for this plugin. The most accurate debug option is to build an app and use the "debuggable" equals "true" option when you build the app. See this for additional details > https://software.intel.com/en-us/xdk/docs/intel-xdk-debug-and-test-overview#RemoteChromeDevTools
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul..sorry.. i have the same problem seems... device block plugin .. i need to add at whitelist?
If yes...how ? I read a intel giudeline..but i ask if you can write a string to allow this plugin in the whitelist...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Daniele -- sorry, but we are not experts on all the third-party plugins out there. I recommend you try using the Debug tab or a built app with "debuggable" set to "true" -- as described in the posts above -- to debug this issue. I highly recommend you start with the examples provided by the plugin author as a starting point. Sometimes it is something as simple as a misplaced comma or quote character.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
i use email-composer and debug but return error... in fn function... i don't know why...
i try to understand..!
Update >> I solve with this plugin EddyVerbruggen/SocialSharing-PhoneGap-Plugin
Fantastic !!! Thx
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page