If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

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

Native Development

Reply
Developer
raju504
Posts: 86
Registered: ‎05-21-2012
My Device: Blackberry 10 Dev Alpha
My Carrier: IDEA

how to add messages to the hub programmatically ?

Hi!

 

     I want to save a message to the phone. And I want to display in the hub. I am using the following code.

 

MessageBuilder *msg2Builder = MessageBuilder::create(current_account.id());
	msg2Builder->body(MessageBody::PlainText, "Hello!");
	msg2Builder->subject("Wishes");

	Message msg1;
	msg1 = *msg2Builder;

	m_message_service->save(sms_account_key, msg1);

 but it's not saving into the hub. What may be the problem... can you please help me ...!

 

- Raju
Please use plain text.