Tip:
Highlight text to annotate it
X
Hi. I'm Ju Young. In this video we'll introduce two ways of making money from your bada apps:
in-app purchasing and advertising. Here's the app we'll be using to show you
how to implement in-app purchasing. Imagine the scene, you've been busy fighting evil
and you want to upgrade your gear. In the in-game shop, you can spend real money on
virtual goods to enhance your game experience. If you reach expert status in the game, you
can even buy additional levels to keep your game challenging. Keep your players interested
and you can create a steady flow of income from your game.
The second feature covered in this video is the Samsung ad hub. The ad hub lets you generate
revenue from in-app advertising. You can choose how often ads are displayed, where they're
shown on screen and even target ads based on a user's age, gender or location - whatever
works best for you. The more effective your ads, the more revenue you can potentially
generate. We'll show you how to use both in-app purchasing and advertising in your apps. We'll
explain how to set everything up and walk you through some sample code.
Here are the components we use for in-app purchasing. Applications use the Commerce::Store
namespace to interact with in-app purchase items available on the Samsung Apps seller
site. The Commerce::Store namespace provides classes
and methods for retrieving information and purchasing items from Samsung Apps. Samsung
Apps allows users to buy apps and app-related items. This is different from the Samsung
Apps Seller Office, which is the admin site for app developers. The Seller Office allows
you to register your apps, their in-app sale items and to make changes to the items available. Let's
have a look at how we implement in-app purchasing. To sell items from within your application,
you need to create a seller account and register your application and its items at the Samsung
Apps Seller Office. Initially you will be given 'Free distribution seller' status but
to add Item groups & items, you will need to request a 'Commercial seller' account. Once
you get your commercial seller status, you'll be able to add in-app purchase items. To
start, go to Applications > Item. Create an item group by clicking 'Add Item Group'. Make
sure you make a note of the Item group ID as you will need to use it in your app's code. Add
the items to the selected group. Register your application by clicking Add New Application.
Then register your items with the application by selecting the item group ID. If you want
to change an item's price or add or remove items from your app once it's deployed, just
log on to the Seller Office . You don't need to make changes to your code or re-release
your app. The Commerce::Store namespace includes the
following classes which are used to implement in-app purchasing: These classes support: Getting
item information from Samsung Apps Retrieving a list of purchased items and allowing the
user to purchase an item from within your application To receive item information from
the Samsung server, use the ItemService class. Item details - such as name, price and description,
are provided in the ItemInfo class. We've derived our KatManDoo form from the IItemServiceListener
class to receive events associated with the ItemService class. First, initialize the itemService
object. Now, call the GetItemList() method to request the group of items. The itemGroupId
parameter is the Group ID value generated when we created the item group on the seller
office website. The item list will be returned in the OnItemListReceivedN callback, which
we have implemented in our KatManDooForm class. To get a list of items that the user has purchased
from the Samsung server, we use the PurchaseInfo class. First we create and construct an object
of the class PurchaseService. Next, we call the GetPurchaseInfo() method to request a
list of items that the user has purchased. The parameters include the itemGroupId, which
is the ID generated when we created the itemGroup. We also pass additional parameters such as
the date range to be used in the search. The KatManDooForm class derives from the IPurchaseServiceListener
and the list of purchased items is returned to us in the OnPurchaseInfoReceivedN callback.
So, the player now wants to purchase an item from within our app - maybe an extra level,
a sword or a potion. To allow this we call the PurchaseItem method of the PurchaseService
class, passing the itemgroup ID and item ID. This sends a purchase request to Samsung Apps
which takes care of the rest of the payment process. The OnItemPurchaseCompleted callback
function gets called when the transaction is complete. This function also gets called
if the user cancels the purchase or the transaction fails for some other reason. Distributing
an ad-supported version of your app offers another way to recoup your development costs. With
very little additional coding, you can integrate adverts in your apps using the classes in
the Ads::Controls namespace. In–App ad support is included with version
2.0 of the SDK and can be added to SDK version 1.2 If you want your app to support ads, make
sure you specify the AD_SERVICE privilege when you create your app's manifest file.
Let's look at how to support in app advertising. First you need to set up the Ad component for your
app and to do this you'll need to register at samsungadhub.com. Once this is set up,
you'll have an Inventory ID which you'll use in your code to start requesting ads. To set
up the ad component, log in to developer.bada.com. Go to the MyApplication section, choose component
setup and select your application. if you have selected AD_SERVICE privilege
for your app, then Advertisement appears in the Setup Components section.
Choose Advertisement and click Detail. Then click Inventory Management.
The 1st step is to fill in Inventory Information. Create a new inventory for your app. Fill
in the app inventory information & click continue. Next specify the Ad networks that you would like
to sign up for and click continue. Finally configure the mediation rules for the selected
ad networks and click save. Now note down the InventoryID which you'll use in your code.
Let's see how Katmandoo supports ads. First we create an Ad object and construct
it, passing the Inventory ID we created when we set up the ad component. Our form is derived
from IAdListener, so we get notified when ads are received. Notice that we're using
the SetKeywords() and SetExtraInfo() methods to provide relevant information to the user.
This will result in better targeting of the ads, making them more interesting, relevant
and likely to be clicked. In our code, we request ads at a regular interval. Once we
call the RequestAd method, the banner will be automatically updated when it receives
the ad from the server. We get notified in the OnAdReceived() method
when an ad has been received. If we want to do any extra processing we can do it in this
method. In this video we explained how to make use of in-app purchasing and advertising
in bada. We showed you how to set up items in your
virtual store and targeted ads in your app. These are both useful ways of increasing the
return on your investment. We hope this video helps your app become a
commercial success. Thanks for watching !