Tip:
Highlight text to annotate it
X
Hi, I'm Jon from the bada team at Samsung. Welcome to part 1 of our video series exploring
the social networking features of bada. In this video we’ll introduce the Social::Services
namespace. We’ll provide an overview of the main classes
used to manipulate profiles, add buddies, send messages and interact with your friends
on Facebook or Twitter. We’ll explain the role of the bada server
and set the scene for the rest of the videos in our social networking series by introducing
Buddy Fix: our location based social networking application.
BuddyFix is now available as an open source project, ready for you to use as the basis
for your own innovative location based social applications for bada.
BuddyFix will be explained in detail in the rest of the videos in this series which will
cover the various parts of the application's functionality
This video is one of a many that introduce various topics that should help get you up
to speed with developing applications for bada.
Make sure you check out our blog at developer.bada.com and the keep an eye out for the rest in the
social networking series and all our other developer videos on YouTube.
The Social::Services namespace contains the classes for building social relationships
among bada users. These services are made possible using the
features of the bada server. The services namespace functionality can be
divided into five groups: Profiles, Privacy, Messaging, and Buddy management together with
the SnsGateway which provides the intergration with third party social networking applications.
Profiles are stored on the bada server and managed by the ProfileService class.
A user’s profile actually could consist of several different types of profiles: including
the BasicProfile, which is public by default and the ContactProfile which includes phone
numbers and email addresses. BuddyFix provides user settings which are
used to specify who can see a user’s profile information.
These settings make use of the PrivacyManager class which controls which part of a user’s
profile information are visible to other users. A Samsung Account is required to access the
bada server and to access its social, location and other server side features.
Within an application you’ll need to get the user to sign in to the bada server by
using the sign-in AppControl. You’ll need to handle the response received
from the bada server by implementing the OnAppControlCompleted method in a class derivingfrom IAppControlEventListener,
such as the SocialForm int he code shown here. The AppControl can also be used for logging
out of the bada server. Users of the bada server can be connected
as Buddies, the social relationship which we manage in BuddyFix.
Sending and responding to buddy requests is handled by the BuddyService class and any
buddy related requests are handled asynchronously by the IBuddyServiceListener.
Messages between buddies are sent using the bada server.
Messages are stored on the server for a certain length of time and retrieved at a set time
interval. The minimal interval of this polling is 30
seconds, so it means you cant actually use the bada server for an Instant messaging type
of service. The MessagingService class deals with sending
and receiving messages and the IMessageServiceListener and IMessageServerEventListener classes process
the response received from the server when sending and receivng messages.
The SnsGateway allows you to create applications that can communicate with 3rd party social
networking services such as Facebook or Twitter. You write code to use bada’s Sns APIs and
don’t have to deal with the low level details or have to worry about coding in other languages
such as JavaScript or Python. Unlike the other Social::Services features,
when using the SnsGatewway, the bada server is just acting as a mediator between the device
and third party servers. Developers just need to write their code using
the bada C++ APIs and bada takes care of the details of communicating the the 3rd party
servers. For example, here’s the JavaScript code
you’d need to write to verify your Twitter account using the Open Authentication method.
And here's the much simpler code using bada's SNS Gateway APIs. BuddyFix makes use of the SnsGateway functionality
to post a private message which contains a Google Map URL of your current location on
a friend’s Facebook wall. This Facebook integration is a feature which
works across platforms, since Facebook is available for most smartphones.
In this video we explained the main functionality of the Social::Services namespace and introduced
Profiles, Privacy, the Buddy Service, Messaging and the SnsGateway.
In the rest of the videos in this series we will take a detailed look at how BuddyFix
uses this functionality to implement its social networking features.
We’ll show you how the BuddyFix code is organised and because BuddyFix is open source,
you’ll be able to use the code as the basis for your own innovative bada social networking
applications. Thanks for watching.