Android Documentation

TuneTalk Direct Carrier Billing for Android – TuneDCB
Software Development Kit (Android)

18th April 2016
Forest Interactive Sdn. Bhd.
Ardiansa Rachmawan

Document Version History

Version Number Version Date Revised By Description
1.0 10/06/2015 Ardiansa Rachmawan First SDK
1.1 06/07/2015 Ardiansa Rachmawan Interface Update
1.2 18/04/2016 Ardiansa Rachmawan 1. Update Charging flow with OTP.
2. Accessible for TuneTalk User only.


TuneDCB is a mobile payment option that lets users purchase and downloads digital contents inside android applications, and the payment is done by charging to users TuneTalk prepaid balance or to users TuneTalk postpaid bill. This TuneDCB is only applicable for TuneTalk Users and in Android apps only.

Downloading the SDK

TuneDCB SDK, can be downloaded from [HERE]. Inside the package will contains of two file that is:

  1. TuneDCB Android Documentation V1.2 (Documentation)
  2. TuneDCB.aar (The SDK)

SDK Setup

Copy TuneDCB.aar file into “libs” folder in the application then build and clean the project, refer Figure 1.
figure 1

And don’t forget to add this library as dependencies in build.gradle file.

Integrating TuneDCB

To integrate TuneDCB SDK into the android apps, developers are required to get AppsID and AppsSecret from TuneDCB developer portal which is Developer can proceed with the login if they are registered otherwise developers need to register themselves as new user. After successful login, users are required to:

  1. Complete Profile Info
  2. Register the Apps (Approval within 24hours)
  3. Get AppsID and AppsSecret

    To use the SDK, the developer need to:


  1. In AndroidManifest file add the permission for “INTERNET” and “READ_PHONE_STATE”

  3. Add import TuneTalk and TuneTalkResult into the project

  5. Add implements “TuneDCBResult” in the activity.

  7. Add Unimplemented Method for “TuneDCBChargingResult”.

  9. Initiate TuneTalk

  11. To do the charging, call the method “TuneTalkPay()”.
  12. Context: Context (MainActivity.this).
    Amount (String): The price for charging the user (Refer Price Points).
    Item (String): The item that is sold in the game/apps (i.e: 100 coins)
    AppID (String): Apps identification code, each app has unique AppsID.
    AppSecret (String): Apps secret code, each app has unique AppsSecret.
    Here is how it looks:


  13. Handle the transaction on “TuneDCBChargingResult” Method. Refer image below. There will be 2 parameter that we have :
    a. String StatusCode : this is the code status for each transaction. (Refer Status Code Below)
    b. String ReferenceCode : this is the transaction code for each transaction


Final Code


Price Points

Here are the ranges of available price points for TuneDCB:

Price Points Description
10 RM 0.10
20 RM 0.20
30 RM 0.30
40 RM 0.40
50 RM 0.50
60 RM 0.60
70 RM 0.70
80 RM 0.80
90 RM 0.90
100 RM 1.00
150 RM 1.50
200 RM 2.00
250 RM 2.50
300 RM 3.00
350 RM 3.50
400 RM 4.00
450 RM 4.50
500 RM 5.00
550 RM 5.50
600 RM 6.00
650 RM 6.50
700 RM 7.00
750 RM 7.50
800 RM 8.00
850 RM 8.50
900 RM 9.00
950 RM 9.50
1000 RM 10.00
1500 RM 15.00
2000 RM 20.00
3000 RM 30.00
4000 RM 40.00
5000 RM 50.00


Status Code

Below are the Status Code descriptions:

Status Code Description
OK Successful Transaction
else Failed Transaction