the Flagship blog & community for App Developers with main focus on Samsung's bada and cross-platform technologies
Bada, Olds and News

Messaging services that apps can access on bada

, November 25th, 2009

It has been reported that the bada SDK will allow the developers to develop apps that have access to the system’s messaging services. This includes (but probably is not limited to):

  • creating and sending SMS messages (receiving?)
  • creating and sending emails with attachments (receiving?)
  • creating and sending MMS messages with attachments (receiving?)
  • receiving Push messages

The attachments will be probably limited to:

  • Image
  • Audio
  • Video

If you wonder what the push messages are, here is a hint:

bada_push_service

Basically it seems to be a service provided by Samsung that collects notifications from many online sources you are interested in and forwards them to you in a nice little package :-)

The messaging services allow a developer to get more creative in the area of “social” apps. Maybe an app that allows you to send a photo directly to all of your favorite friends in one click via MMS? The push messages may be interesting for distributed apps that run partly as a service on a separate server. I am not sure yet how the integration works exactly though.

Edit: I have just received a sample code of how MMS sending is done on bada. Enjoy!

SendMmsMessage.h

#ifndef _SENDMMSMESSAGE_H_
#define _SENDMMSMESSAGE_H_

// includes
#include "FMessaging.h"

class SendMmsMessage
	: public Osp::Base::Object
{
public:
	SendMmsMessage(void) {}
	~SendMmsMessage(void) {}

public:
	void MmsTest(void);
};

#endif//_SENDMMSMESSAGE_H_

SendMmsMessage.cpp

#include "SendMmsMessage.h"

using namespace Osp::Base;
using namespace Osp::Messaging;

// Create listener, overriding the OnMmsMessageSent function of the IMmsListener,
// in order to be notified of change in state of message being sent

class MmsListener : public IMmsListener, Object
{
public:
	void OnMmsMessageSent(result r);
};
void MmsListener::OnMmsMessageSent(result r)
{
	// do something
}

void SendMmsMessage::MmsTest(void)
{
	result r = E_SUCCESS;

	// Create MmsListener object
	MmsListener mmsListener;

	// Create a MmsManager instance with listener as the callback to check the status of the message being sent.
	MmsManager mmsManager;
	r = mmsManager.Construct(mmsListener);

	// Create a message instance
	MmsMessage mmsMessage;
	r = mmsMessage.SetSubject(L"mms subject");
	r = mmsMessage.SetText(L"Hello, world");
	r = mmsMessage.AddAttachment(MMS_IMAGE, L"/Media/Images/My photos/image.jpg");

	// Populate the message
	RecipientList recipients;
	r = recipients.Add(RECIPIENT_TYPE_TO, L"+82312798535");
	r = recipients.Add(RECIPIENT_TYPE_CC, L"+82312792288"); 

	// Send the message, and set the saveToOutbox parameter to true if the message should be saved in outbox. Otherwise, set to false.
	// MmsListener callback will be called once the message has been completely sent.
	r = mmsManager.Send(mmsMessage, recipients, true);
}

Related posts:

  1. Apps: Great Demand on Samsung Apps Store
  2. Problems Developing Free Apps for Bada
  3. Samsung Will Allow Advertising in Apps!!!

Post a Comment

Editor's picks

Copyright 2009-2010 BadaDev.com (unless otherwise stated). All rights reserved! Powered by Wordpress!