Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
Tsudeily
Posts: 16
Registered: ‎10-18-2010
My Device: Not Specified
Accepted Solution

Menu option to compose an e-mail

I'm trying to add an option to Send Feedback in my apps menu, and have successfully added the menu option. I've tried checking out the API pages and for some reason I'm stuck. I was using this code sample to test it.

 

 

<script type="text/javascript">
  var message = new blackberry.message.Message();
  message.toRecipients = "noone@blackberryWidgets.com";
  message.subject = "Hello";
  message.body = "World";
  message.send();
</script>

 

After that worked flawlessly, I removed the message.send(); hoping it would just go to the e-mail app allowing the user to add to the body as they see fit but nothing happened. What am I missing?

 

Please use plain text.
Developer
Tsudeily
Posts: 16
Registered: ‎10-18-2010
My Device: Not Specified

Re: Menu option to compose an e-mail

Nevermind.. I figured it out using this.

 

 

  var args = new blackberry.invoke.MessageArguments('foo@domain.com', 'hello', 'world');
  args.view = blackberry.invoke.MessageArguments.VIEW_NEW; // New
   
  blackberry.invoke.invoke(blackberry.invoke.APP_MESSAGES, args);  // New Message
  MessageArguments();

 

 

Please use plain text.
Developer
Zukka
Posts: 201
Registered: ‎05-08-2012
My Device: PlayBook 64 Gb and Z10 LE
My Carrier: Vodafone

Re: Menu option to compose an e-mail

Hi .. I can't resolve .. 

my config.xml is:

 

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets"
xmlns:rim="http://www.blackberry.com/ns/widgets"
version="1.0.0.0" id="MondoBlackBerry">
<name>MondoBlackBerry</name>
<author>Alessandro Bellotti</author>
<description>Mondo BlackBerry App</description>

<feature id="blackberry.invoke.MessageArguments" required="true" version="1.0.0.0"/>
<feature id="blackberry.invoke" />
<feature id="blackberry.message" required="true" version="1.0.0.0"/>
<feature id="blackberry.invoke.BrowserArguments" required="true" version="1.0.0.0"/>
<icon src="images/icon.png"/>
<access subdomains="false" uri="http://www.blackberry.com"/>

<content src="index.html"/>
</widget>

 

in alternative I use 

<feature id="blackberry.invoke" required="true" version="1.0.0.0"/>

 

but not good.

 

My index.html is

 

head :

<script type="text/javascript">
function launchmail() {
var args = new blackberry.invoke.MessageArguments('zukka75@gmail.com', 'hello', 'world');
args.view = blackberry.invoke.MessageArguments.VIEW_NEW; // New
blackberry.invoke.invoke(blackberry.invoke.APP_MESSAGES, args); // New Message
MessageArguments();
}

 

body:

    <img src="images/scrivici.png" onclick="launchmail()" width="86" height="43" border="0" vspace="5" align="middle">

 

Why don't work ? :smileysad:

 

 

 

_______________________________________________

If U like my post click on LIKE :smileywink:
Please use plain text.