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
Contributor
Galih
Posts: 28
Registered: ‎01-31-2012
My Device: 8520
My Carrier: Telkomsel
Accepted Solution

blackberry.launch.newSMS text cannot load

Im use blackberry.launch.newSMS for launch a sms, but my text body cannot load in device.

blackberry.launch.newSMS({ 'number':'123456', 'text':'my texts body'});

 

Some one can help me?

Please use plain text.
Contributor
Galih
Posts: 28
Registered: ‎01-31-2012
My Device: 8520
My Carrier: Telkomsel

Re: blackberry.launch.newSMS text cannot load

blackberry.launch.newSMS({ 'number':'123456', 'text':'my texts body'});

 My body text cannot load in my device, 

please some one can help for solve my problem?

Please use plain text.
Developer
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: blackberry.launch.newSMS text cannot load

Hi!

Any reason why you are not using the SMS API? https://developer.blackberry.com/html5/apis/blackberry.message.sms.html

Nuno
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Please use plain text.
Contributor
Galih
Posts: 28
Registered: ‎01-31-2012
My Device: 8520
My Carrier: Telkomsel

Re: blackberry.launch.newSMS text cannot load

Sorry im wrong for accpet as Solution,
Im has try a sms API, but is same still not working.
im just copy this code to html file, and add fiture to xml, but does't work

are u have sample for use sms API, maybe im wrong code.
Please use plain text.
Developer
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: blackberry.launch.newSMS text cannot load

Please try to be more specific. "doesnt work" doesn't really help...

Did you try the simple example in the API docs?

Nuno
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Please use plain text.
Contributor
Galih
Posts: 28
Registered: ‎01-31-2012
My Device: 8520
My Carrier: Telkomsel

Re: blackberry.launch.newSMS text cannot load

I have been try a sample SMS API, like this

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" id="viewport" content="height=device-height,width=device-width,user-scalable=no" />
<title>SMS</title>
<script type="text/javascript">
  blackberry.launch.newSMS({ "number":"3030", "text":"My Message" });

  var listener = function (msg, from, date) {
    alert(from+" "+msg+" "+date);
  }

  blackberry.message.sms.isListeningForMessage = true;
  blackberry.message.sms.addReceiveListener(listener);

  if (blackberry.message.sms.removeReceiveListener()){
    alert("Listener removed successfully.");
    blackberry.message.sms.isListeningForMessage = false;
  }
</script>
</head>
<body>
<p>SMS</p>
</body>
</html>


 

<?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">
  <name>coba</name>
  <author email="my@email.com">Abc</author>
  <feature id="blackberry.message.sms" />
  <feature id="blackberry.message" required="true" version="1.0.0.0"/>
  <feature id="blackberry.app" required="true" version="1.0.0.0"/>
  <feature id="blackberry.identity" required="true" version="1.0.0.0"/>
  <feature id="blackberry.identity.phone" required="true" version="1.0.0.0"/>
  <feature id="blackberry.invoke.MessageArguments" required="true" version="1.0.0.0"/>
  <feature id="blackberry.invoke.PhoneArguments" required="true" version="1.0.0.0"/>
  <feature id="blackberry.app.event" required="true" version="1.0.0.0"/>
  <feature id="blackberry.find" required="true" version="1.0.0.0"/>
  <feature id="blackberry.system" required="true" version="1.0.0.0"/>
  <content src="index.html"/>
</widget>

 But a nothing happens, i neet code SMS for working in OS 5 and less.

 

Thanks

 

Please use plain text.
Developer
nunodonato
Posts: 313
Registered: ‎03-28-2012
My Device: Curve 9360, Playbook, BB10 Dev Alpha
My Carrier: TMN

Re: blackberry.launch.newSMS text cannot load

Hi

what do you expect it to do?

Nuno
theBBthing.wordpress.com - my BlackBerry development blog: news, tips and tutorials
bitoutsidethebox.com - re-imagining digital solutions


Please use plain text.
Contributor
Galih
Posts: 28
Registered: ‎01-31-2012
My Device: 8520
My Carrier: Telkomsel

Re: blackberry.launch.newSMS text cannot load

I just want to launch SMS run well in OS5++, but this code connot working in OS 5,
Look at this, my reply
http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/Invoke-SMS-app-instead-of-Email-...
Please use plain text.