SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
Samsung IAP

Manikantan K
Manikantan.k@samsung.com
@manikantan_k
Introduction
• In-App Purchase enables you to sell various items from
inside your applications.
• In-App Purchase is only available for Android-based
applications for Samsung Apps.
• Currently, it supports more than 60 countries with Credit
card, P-SMS, and several local payment methods.
IAP v2
New version of library was released recently. Supports
• Consumable/non-consumable/subscription
• Account based purchase management (not IMEI based)
• Supports Samsung Single Sign On.
• Increased geographic coverage US via Credit card.
• Uses AIDL (Android Interface Definition Language) for a
more seamless user experience
Consumable Vs Non consumables
CONSUMABLES
One off purchase and cannot be restored.
Eg : Medikit, life points or coins in games.
NON CONSUMABLES
Restorable and are account based.
Eg : Unlock stages in a game, premium upgrade
Subscriptions
Subscriptions are convenient for recurring periodic
purchases.
Eg : Magazines or TV shows or newspapers
A simple purchase flow Hotel Story
A simple purchase flow Hotel Story
Step 1 IAP install check
• Check IAP installation
Intent serviceIntent = new Intent(
"com.sec.android.iap.service.iapService" );
Boolean flag = getPackageManager().queryIntentServices(
serviceIntent, 0 ).isEmpty()
Step 2 Samsung Account check
• Check Samsung Account on the phone
ComponentName com = new ComponentName(
"com.sec.android.iap",
"com.sec.android.iap.activity.AccountActivity" );
Intent intent = new Intent(); intent.setComponent( com );
startActivityForResult(intent, 1001);
Step 3 Bind with IAPConnector
Intent serviceIntent = new Intent(
"com.sec.android.iap.service.iapService" );
bindService( serviceIntent, mServiceConn,
Context.BIND_AUTO_CREATE );
Step 4 Setup IAPConnector
Init() must be first called before any IAP operation.
Init() setups basic account payment information
Call it on separate thread to avoid ANR.

Bundle result = mIAPConnector.init( mMode );
Step 5 Functions on IAPConnector
Call it on separate thread to avoid ANR.
Result is a Bundle along with a STATUS_CODE

Bundle itemList = mIAPConnector.getItemList( developerMode,
getPackageName(), _itemGroupId, _startIndexInList,
_endIndexInList,
_itemType );
Step 6 Purchase
Bundle bundle = new Bundle();
bundle.putString( "THIRD_PARTY_NAME", getPackageName() );
bundle.putString( "ITEM_GROUP_ID", _itemGroupId );
bundle.putString( "ITEM_ID", _itemId );

ComponentName com = new ComponentName( "com.sec.android.iap",
"com.sec.android.iap.activity.PaymentMethodListActivity" );
Intent intent = new Intent( Intent.ACTION_MAIN );
intent.addCategory( Intent.CATEGORY_LAUNCHER );
intent.setComponent( com );
intent.putExtras( bundle );
startActivityForResult( intent, 1000 );
Step 6 Purchase
Do Purchase in separate thread, to avoid ANR.
Returned result from purchase.
STATUS_CODE AND ERROR_STRING describe the outcome of
purchase.
RESULT_OBJECT is a big JSON, which includes info such as
purchaseID, purchase Date, price, item image etc.
Step 7 Unbind IAPConnector
Unbind IAPConnector and Service Connection Object.
This after all IAP operations are completed and to release the
associated resources

unbindService( mServiceConn );
Resources
http://developer.samsung.com/android/tools-sdks/In-App-Purchase-Library
Includes sample code, technical documentation and FAQ.

Manikantan K
Manikantan.k@samsung.com
@manikantan_k

Mais conteúdo relacionado

Semelhante a Samsung IAP SDK

Android In-App Billing @ Droidcon 2011
Android In-App Billing @ Droidcon 2011Android In-App Billing @ Droidcon 2011
Android In-App Billing @ Droidcon 2011
Robot Media
 
Android In-App Billing @ Barcelona GTUG
Android In-App Billing @ Barcelona GTUGAndroid In-App Billing @ Barcelona GTUG
Android In-App Billing @ Barcelona GTUG
Robot Media
 
Android In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon MurciaAndroid In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon Murcia
Robot Media
 

Semelhante a Samsung IAP SDK (20)

Android In-App Billing @ Droidcon 2011
Android In-App Billing @ Droidcon 2011Android In-App Billing @ Droidcon 2011
Android In-App Billing @ Droidcon 2011
 
Android In-App Billing @ Barcelona GTUG
Android In-App Billing @ Barcelona GTUGAndroid In-App Billing @ Barcelona GTUG
Android In-App Billing @ Barcelona GTUG
 
Self checkout application presentation
Self checkout application presentationSelf checkout application presentation
Self checkout application presentation
 
IRJET- Smart Billing Cart
IRJET- Smart Billing CartIRJET- Smart Billing Cart
IRJET- Smart Billing Cart
 
Turn your smartphone into a sensor.pptx
Turn your smartphone into a sensor.pptxTurn your smartphone into a sensor.pptx
Turn your smartphone into a sensor.pptx
 
Point of Sale Paytm Payment
Point of Sale Paytm PaymentPoint of Sale Paytm Payment
Point of Sale Paytm Payment
 
All-in-One Intelligent Shopping Trolley with Automatic Billing and Payment Sy...
All-in-One Intelligent Shopping Trolley with Automatic Billing and Payment Sy...All-in-One Intelligent Shopping Trolley with Automatic Billing and Payment Sy...
All-in-One Intelligent Shopping Trolley with Automatic Billing and Payment Sy...
 
Beintoo for AWS
Beintoo for AWSBeintoo for AWS
Beintoo for AWS
 
Beintoo on Amazon Web Services
Beintoo on Amazon Web ServicesBeintoo on Amazon Web Services
Beintoo on Amazon Web Services
 
[Android] Google Play in app billing
[Android] Google Play in app billing[Android] Google Play in app billing
[Android] Google Play in app billing
 
Payment Jack Processing
Payment Jack ProcessingPayment Jack Processing
Payment Jack Processing
 
Android In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon MurciaAndroid In-app Billing @ Droidcon Murcia
Android In-app Billing @ Droidcon Murcia
 
Setting up BuzzCity account - App Developer
Setting up BuzzCity account - App DeveloperSetting up BuzzCity account - App Developer
Setting up BuzzCity account - App Developer
 
Testing In App Billing
Testing In App BillingTesting In App Billing
Testing In App Billing
 
IJSRED-V2I2P56
IJSRED-V2I2P56IJSRED-V2I2P56
IJSRED-V2I2P56
 
Intelligent trolley for shopping mall using io t
Intelligent trolley for shopping mall using io tIntelligent trolley for shopping mall using io t
Intelligent trolley for shopping mall using io t
 
Abandoned carts
Abandoned cartsAbandoned carts
Abandoned carts
 
Paypal Integration For Android Application By LetsNurture
Paypal Integration For Android Application By LetsNurturePaypal Integration For Android Application By LetsNurture
Paypal Integration For Android Application By LetsNurture
 
IAP auto renewable in practice
IAP auto renewable  in practiceIAP auto renewable  in practice
IAP auto renewable in practice
 
Documentation
DocumentationDocumentation
Documentation
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Samsung IAP SDK

  • 2. Introduction • In-App Purchase enables you to sell various items from inside your applications. • In-App Purchase is only available for Android-based applications for Samsung Apps. • Currently, it supports more than 60 countries with Credit card, P-SMS, and several local payment methods.
  • 3. IAP v2 New version of library was released recently. Supports • Consumable/non-consumable/subscription • Account based purchase management (not IMEI based) • Supports Samsung Single Sign On. • Increased geographic coverage US via Credit card. • Uses AIDL (Android Interface Definition Language) for a more seamless user experience
  • 4. Consumable Vs Non consumables CONSUMABLES One off purchase and cannot be restored. Eg : Medikit, life points or coins in games. NON CONSUMABLES Restorable and are account based. Eg : Unlock stages in a game, premium upgrade
  • 5. Subscriptions Subscriptions are convenient for recurring periodic purchases. Eg : Magazines or TV shows or newspapers
  • 6. A simple purchase flow Hotel Story
  • 7. A simple purchase flow Hotel Story
  • 8.
  • 9. Step 1 IAP install check • Check IAP installation Intent serviceIntent = new Intent( "com.sec.android.iap.service.iapService" ); Boolean flag = getPackageManager().queryIntentServices( serviceIntent, 0 ).isEmpty()
  • 10. Step 2 Samsung Account check • Check Samsung Account on the phone ComponentName com = new ComponentName( "com.sec.android.iap", "com.sec.android.iap.activity.AccountActivity" ); Intent intent = new Intent(); intent.setComponent( com ); startActivityForResult(intent, 1001);
  • 11. Step 3 Bind with IAPConnector Intent serviceIntent = new Intent( "com.sec.android.iap.service.iapService" ); bindService( serviceIntent, mServiceConn, Context.BIND_AUTO_CREATE );
  • 12. Step 4 Setup IAPConnector Init() must be first called before any IAP operation. Init() setups basic account payment information Call it on separate thread to avoid ANR. Bundle result = mIAPConnector.init( mMode );
  • 13. Step 5 Functions on IAPConnector Call it on separate thread to avoid ANR. Result is a Bundle along with a STATUS_CODE Bundle itemList = mIAPConnector.getItemList( developerMode, getPackageName(), _itemGroupId, _startIndexInList, _endIndexInList, _itemType );
  • 14. Step 6 Purchase Bundle bundle = new Bundle(); bundle.putString( "THIRD_PARTY_NAME", getPackageName() ); bundle.putString( "ITEM_GROUP_ID", _itemGroupId ); bundle.putString( "ITEM_ID", _itemId ); ComponentName com = new ComponentName( "com.sec.android.iap", "com.sec.android.iap.activity.PaymentMethodListActivity" ); Intent intent = new Intent( Intent.ACTION_MAIN ); intent.addCategory( Intent.CATEGORY_LAUNCHER ); intent.setComponent( com ); intent.putExtras( bundle ); startActivityForResult( intent, 1000 );
  • 15. Step 6 Purchase Do Purchase in separate thread, to avoid ANR. Returned result from purchase. STATUS_CODE AND ERROR_STRING describe the outcome of purchase. RESULT_OBJECT is a big JSON, which includes info such as purchaseID, purchase Date, price, item image etc.
  • 16. Step 7 Unbind IAPConnector Unbind IAPConnector and Service Connection Object. This after all IAP operations are completed and to release the associated resources unbindService( mServiceConn );
  • 17. Resources http://developer.samsung.com/android/tools-sdks/In-App-Purchase-Library Includes sample code, technical documentation and FAQ. Manikantan K Manikantan.k@samsung.com @manikantan_k