Quantcast
Jump to content


Recommended Posts

Posted

Is there a way to take the application files from the TV and run it on Samsung's Tizen blu-ray player?

I have a problem with the application from the Samsung Store. Its publisher left version 5 available for my Samsung UBD-M9500 player. This version does not work anymore, but on Samsung TVs it is version 6. The system is the same, so if i had access to the files of this application maybe it could be launched via developer mode on the blu-ray player.

Does anyone know how it can be done?



  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Similar Topics

    • By Samsung Newsroom
      Integrating payments into a mobile app is a security-critical and UX-sensitive task. While Flutter simplifies cross-platform development, platform-specific payment systems like Samsung Pay still require careful handling.
      Samsung provides an official Samsung Pay SDK Flutter Plugin, which allows Flutter applications to integrate Samsung Pay without writing custom platform channels. However, for production-grade integration, using the plugin correctly is essential, especially when it comes to checking Samsung Pay readiness.
      In this blog, you learn how to build a sample Flutter application by using the official Samsung Pay SDK Flutter Plugin and following Samsung-recommended best practices. You can download the complete sample project at the end of this blog.
      Why Use the Official Samsung Pay SDK Flutter Plugin?
      Integrating payment systems requires careful handling of platform constraints, security, and long-term maintainability. The Samsung Pay SDK Flutter Plugin addresses these concerns by providing an official abstraction over the native Samsung Pay SDK, enabling Flutter applications to leverage Samsung Wallet features without direct interaction with platform-specific APIs.
      By exposing supported Dart APIs and managing native SDK communication internally, the Flutter plugin removes the need for custom MethodChannel implementations and reduces integration risk. For Flutter applications targeting Samsung Galaxy devices, this approach offers the most stable and maintainable path to Samsung Pay integration.
      The following diagram illustrates the high-level architecture of the Samsung Pay integration.

      Figure 1: Samsung Pay integration architecture
      Prerequisites
      Before starting, ensure the following requirements are met:
      You are an approved Samsung Pay partner (approval typically takes a few days) A service is created in the Samsung Pay partner portal. Find details from here. The latest version of Android Studio is installed The Flutter SDK is installed and configured The Samsung Pay SDK Flutter Plugin is downloaded Set Up the Integration Code
      To start the integration process, add the Samsung Pay SDK Flutter Plugin to your project dependencies:
      dependencies: samsung_pay_sdk_flutter: path: ./samsungpaysdkflutter_v1.03.00/samsungpaysdkflutter Next, configure the Samsung Pay SDK API level by setting a valid Samsung Pay SDK API version (latest version: 2.22) by opening android > app > src > main > AndroidManifest.xml and adding the API level in the metadata inside the <application> tag.
      <meta-data android:name="spay_sdk_api_level" android:value="2.22" /> <!-- Use the most recent SDK version to leverage the latest APIs --> Initialize Samsung Pay in Flutter
      Create an instance of SamsungPaySdkFlutter with valid PartnerInfo (which contains the service ID and service type). If you are a merchant, then the service type must be set to INAPP_PAYMENT.
      The following code snippet initializes the Samsung Pay SDK using your service ID and in-app payment configuration.
      import 'package:samsung_pay_sdk_flutter/samsung_pay_sdk_flutter.dart'; static final SamsungPaySdkFlutter sdk = SamsungPaySdkFlutter( PartnerInfo( serviceId: SERVICE_ID, data: { SpaySdk.PARTNER_SERVICE_TYPE: ServiceType.INAPP_PAYMENT.name } ) ); Check Samsung Pay Availability
      Samsung Pay readiness must be checked before calling any API of the Samsung Pay SDK Flutter Plugin. There are several reasons why Samsung Pay might not be in the ready state, such as an unsupported device, unsupported region, or incomplete Samsung Wallet setup, so this check is mandatory.
      SamsungPayConfig.sdk.getSamsungPayStatus( StatusListener( onSuccess: (status, bundle) { // Status "2" means Samsung Pay is READY onResult(status == "2"); }, onFail: (errorCode, bundle) { // If status check fails, Samsung Pay is not ready onResult(false); } ) ); NoteDo not show the Samsung Pay button if the Samsung Pay status is not READY. Create Payment Information with a Custom Payment Sheet
      To initiate a transaction, you must create a payment request using a custom payment sheet.
      The AmountBoxControl object is mandatory for building a CustomSheet. It provides the monetary details of the transaction.
      AmountBoxControl amountControl = AmountBoxControl( Strings.AMOUNT_CONTROL_ID, Strings.currency ); // Add product item to the payment sheet amountControl.addItem( product.productId, product.name, product.price, "" ); // Set total amount (product price + additional fees) // You can add tax, shipping, or other fees here amountControl.setAmountTotal( product.price + 5.00, // Add $5 for shipping/fees as example SpaySdk.FORMAT_TOTAL_PRICE_ONLY ); Next, add the amountBoxControl to the CustomSheet instance.
      CustomSheet customSheet = CustomSheet(); customSheet.addControl(amountControl); Finally, create the payment information by populating the CustomSheetPaymentInfo instance
      // Configure merchant information for the payment CustomSheetPaymentInfo paymentInfo = CustomSheetPaymentInfo( merchantName: "Samsung Pay Flutter App", customSheet: customSheet ); // Set merchant details paymentInfo.merchantId = "123456"; paymentInfo.setMerchantName("Sample Merchant"); paymentInfo.setMerchantCountryCode("US"); Request Payment
      To start the payment process, call the startInAppPayWithCustomSheet() API. This API requires CustomSheetPaymentInfo and CustomSheetTransactionInfoListener instances set up in the last step.
      When this API is called, a custom payment sheet is displayed on the merchant application screen. The user can select a registered card for the payment and change the billing and shipping addresses if needed. Payment results are delivered to the CustomSheetTransactionInfoListener.
      The onCardInfoUpdated() callback is triggered when the user changes the payment card. In this callback, the updateSheet() method must be called to update current payment sheet.
      CustomSheetTransactionInfoListener listener = CustomSheetTransactionInfoListener( onCardInfoUpdated: (PaymentCardInfo cardInfo, CustomSheet sheet) { // Called when user changes the selected card on payment sheet // You can update the sheet here if needed (e.g., change fees based on card) SamsungPayConfig.sdk.updateSheet(sheet); }, onSuccess: (paymentInfo, paymentCredential, extraData) { // Payment completed successfully // paymentCredential contains the encrypted card details to send to your backend print("Payment Successful!"); print("Payment Credential: $paymentCredential"); onSuccess(); }, onFail: (errorCode, bundle) { // Payment failed or user cancelled print("Payment Failed: $errorCode"); onFail(errorCode); } ); Lastly, call startInAppPayWithCustomSheet() API to start the payment:
      SamsungPayConfig.sdk.startInAppPayWithCustomSheet(paymentInfo, listener); Testing Samsung Pay Integration
      Follow the steps below to test Samsung Pay integration
      Configure the STG environment: Add tester accounts to your service and generate a debug expiration date for the test accounts. Install Samsung Wallet test application: To test your application in the staging environment, the latest version of the Samsung Wallet test application is required. You can install it from the Samsung Pay Partner portal. However, to test your app in production mode, you need to use a market released application. Test cards: To thoroughly test your application, you must add at least one payment card to the Samsung Wallet application. Samsung provides test cards for this purpose. Keep in mind that the test cards only work in staging environments, not in production. Run the application: After setting up the environment, build the application and test it on any supported Galaxy device.
      Figure 2: Samsung Pay Flutter sample application
      Release Your Application
      After successful testing, submit your application for release approval through the Samsung Pay Developers Portal. Once approved, your app can be published for your users.
      Conclusion
      Using the official Samsung Pay SDK Flutter Plugin makes it simpler to create a secure and reliable payment integration for Flutter applications on Galaxy devices. By following Samsung-recommended practices, such as checking Samsung Pay readiness and handling custom payment sheets correctly, you can build a production-ready and maintainable payment experience.
      Additional Resources
      Samsung Pay Documentation provides an overview of the key features and highlights the benefits of using Samsung Pay. Samsung Pay Partner Onboarding is an end-to-end guide of becoming a partner to release your app. Samsung Pay – Code Lab is an interactive, hands-on tutorial that teaches you to how to integrate Samsung Pay SDK. Samsung Developer Forums is an open community for developers where you can post your query and get support from other developers. Samsung Developer Tech Support Channel is a 1-on-1 support channel where you can get assistance from the Samsung engineers. Download the complete sample project here. View the full blog at its source
    • By Samsung Newsroom
      Digital identity verification has become a rising topic in the current technological landscape. Samsung Wallet allows Samsung Galaxy device users to securely register their state-issued US driver's license in their device, letting them use it as a mobile driver's license (mDL). Through the "Verify with Wallet" (VWW) functionality, Samsung Wallet provides Android developers with the ability to authenticate a user's identity directly from their application by utilizing the user's registered mDL on the device. The implementation of the functionality is based on and is fully compliant with the ISO 18013-5 standard. In this article, we explore the complete process of implementing Verify with Wallet in an Android application.
      Prerequisites
      In order to complete the tasks in this article and implement a complete sample application for verifying a user's identity, you need the following:
      Valid US driver's license or state ID US region Samsung Galaxy device with mDL support Complete the Samsung Wallet Partner onboarding process Understanding the Verify with Wallet process
      Samsung Wallet offers a native Relying Party (RP) SDK for Android applications. RP SDK is an App2App SDK designed for enabling Samsung Wallet's mDL service in online use cases. By integrating this SDK, you can leverage the VWW functionality within their applications.
      In your application, you need to create a JSON object for defining the request and a JSON payload for the Relying Party card. Then, you can utilize the RP SDK to create a valid mDoc request using the provided information. Finally, the request needs to be sent to the Samsung Wallet application.
      In response, Samsung Wallet sends an encrypted response back to the application, which contains the requested information in a CBOR encoded format. The application can then decode the provided data and use it as necessary. Refer to the ISO 18013-5 standard, AAMVA mDL guidelines and the Samsung Wallet documentation for a better understanding of the VWW process.
      Implementing the Verify with Wallet Functionality in Your Android Application
      The process of implementing VWW in an Android application includes creating a Relying Party card for Samsung Wallet, downloading and integrating the RP SDK into the Android application and implementing the necessary functions in the Android application for completing the verification process.
      Creating a Relying Party Wallet Card Template in the Samsung Wallet Partners Portal
      In order to implement and use the VWW functionality, you need a wallet card of the Relying Party type for this purpose.
      To create a Relying Party wallet card template:
      Go to the Samsung Wallet Partners Portal. Select Wallet Card > Create Wallet Cards. From Wallet Card Templates, select Relying Party. Select the applicable Service Location and Authentication Issuer from the Advanced setting section. Make sure to select the proper values for the card, otherwise the verification process may not work. Figure 1: Creating a Relying Party card for VWW
      Integrating the RP SDK in an Android Application
      Once the Relying Party card template has been created, we can download and integrate the RP SDK to work with the Android application.
      Step 1: Download the RP SDK for Android
      To download the RP SDK:
      Download the ZIP file containing the latest RP SDK release AAR file from Samsung Wallet Code Resources on the Samsung Developer website. Extract the AAR file from the downloaded ZIP file. Copy and paste the downloaded rp-sdk-x.xx-release.aar file inside a new directory in the Android Studio project (for example, \libs\). Step 2: Add Android Manifest Permissions
      To implement the Verify with Wallet functionality, the application needs both the Internet access permission and the ability to query the installed Samsung Wallet application. To provide the application with these permissions, open the AndroidManifest.xml file in the Android Studio project and add the following lines:
      <uses-permission android:name="android.permission.INTERNET" /> <queries> <package android:name="com.samsung.android.spay" /> </queries> Step 3: Add Gradle Dependencies
      In the application's build.gradle file, load the RP SDK AAR file and the necessary additional dependencies for using the SDK, as follows:
      // Load RP SDK AAR file implementation(files("libs/rp-sdk-1.05-release.aar")) //CBOR decoding dependencies implementation("com.upokecenter:cbor:4.0.1") implementation("com.augustcellars.cose:cose-java:1.1.0") // Other dependencies implementation("com.google.code.gson:gson:2.11.0") implementation("org.bouncycastle:bcprov-jdk15to18:1.66") implementation("com.nimbusds:nimbus-jose-jwt:9.37.3") implementation("io.reactivex.rxjava2:rxjava:2.2.21") implementation("io.reactivex.rxjava2:rxkotlin:2.4.0") implementation("io.reactivex.rxjava2:rxandroid:2.1.1") implementation("com.squareup.okhttp3:okhttp:4.11.0") After these steps, the RP SDK is ready for use in your Android application.
      Configuring the Android Application for Verify with Wallet
      Next, we need to complete the implementation of the Verify with Wallet functionality in your Android application.
      Step 1: Build a Card Payload for the Relying Party Card
      First, we need to create a request payload for the Relying Party card following the specification.
      private fun buildApp2AppPayload(): String { return PAYLOAD .replace("{refId}", UUID.randomUUID().toString()) .replace("{createdAt}", System.currentTimeMillis().toString()) .replace("{updatedAt}", System.currentTimeMillis().toString()) } private val PAYLOAD = """ { "card": { "type": "relyingparty", "data": [ { "createdAt": {createdAt}, "updatedAt": {updatedAt}, "language": "en", "refId": "{refId}", "attributes": { "clientPackageName": "com.ahsan.verifyappsample", "clientType": "app", "fontColor": "#ffffff", "logoImage": "https://kr-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/9/4/b940b7a2-0f55-42ce-8da7-025d50dbb6b7.png", "logoImage.darkUrl": "https://kr-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/9/4/b940b7a2-0f55-42ce-8da7-025d50dbb6b7.png", "logoImage.lightUrl": "https://kr-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/9/4/b940b7a2-0f55-42ce-8da7-025d50dbb6b7.png", "providerName": "Samsung Verification Sample" } } ] } } """.trimIndent() Step 2: Build the AppLink
      The AppLink is a tokenized URL that is similar to the CData tokens used for Samsung Wallet cards. The Samsung Wallet RP SDK includes a function to generate the AppLink using the payload and the partner credentials (private key, public key, partner ID, card ID, certificate ID, etc.).
      To build the AppLink, you can simply call the rpClientApis.buildAppLink() function with the required parameters:
      val rpClientApis = RpClientApis(this) val appLink = rpClientApis.buildAppLink( partnerId = PARTNER_ID, cardId = CARD_ID, payload = buildApp2AppPayload(), samsungPublicKey = SAMSUNG_CERTIFICATE, partnerPublicKey = PARTNER_CERTIFICATE, partnerPrivateKey = PARTNER_PRIVATE_KEY, partnerCertificateId = CERTIFICATE_ID, isStagingServer = true ) Step 3: Build the Request Data
      Finally, once the AppLink creation is complete, we can send the verification request using the RP SDK.
      Before sending the request, we need to specify exactly which information we wish to retrieve. For this purpose, we need to create a JSON document following the ISO 18013-5 specification and specify the fields we wish to retrieve in the response. It is possible to request for the following fields in the request data under the "org.iso.18013.5.1" namespace:
      portrait family_name given_name document_number age_in_years resident_address birth_date issue_date expiry_date sex height weight_range weight eye_colour hair_colour organ_donor driving_privileges veteran Additionally, it is also possible to request for the following 3 fields, under the "org.iso.18013.5.1.aamva" namespace:
      domestic_driving_privileges DHS_compliance EDL_credential In our example, we only try to retrieve the following 4 fields: family_name, age_in_years, issue_date, and expiry_date. In the following code example, we build the request string accordingly:
      val requestData = """ { "docType": "org.iso.18013.5.1.mDL", "nameSpaces": { "org.iso.18013.5.1": { "family_name": true, "age_in_years": true, "issue_date": true, "expiry_date": true } } } """.trimIndent() Step 4: Create the OnResponseListener Class
      When using the VWW RP SDK, it is necessary to create a listener class for both sending the request and for receiving and processing the response from the mDoc server.
      For our example, let's create an empty placeholder OnResponseListener class which extends the RP SDK's OnResponseListener class.
      class OnResponseListener(private val requestData: String) : RpClientApis.OnResponseListener{ override fun onGetMdocRequestData(deviceEngagementBytes: ByteArray): ByteArray? { TODO("Not yet implemented") } override fun onMdocResponse(encryptedResponseBytes: ByteArray) { TODO("Not yet implemented") } override fun onMdocResponseFailed(exception: Exception) { Log.e(TAG, "Response processing failed", exception) } } Initiating the Verification Request
      To initiate the identity verification process, we need to establish a secure session and send a structured request to the Samsung Wallet application. We can use the previously created OnResponseListener class for this purpose.
      Step 1: Define the onGetMdocRequestData() Function for Sending the Request Data
      Inside the onGetMdocRequestData() function, we need to do 2 things for establishing a secure encrypted session:
      Generate an elliptic curve key pair Build session establishment bytes following the ISO-18013-5 specification. Once the key pair is generated, we can use this key pair, the device engagement bytes, and the previously created request data for building the encrypted session establishment bytes. The device engagement bytes are provided automatically inside the onGetMdocRequestData() function by the RP client SDK.
      private val secureRepository = SecureRepository() override fun onGetMdocRequestData(deviceEngagementBytes: ByteArray): ByteArray? { val keyPair = secureRepository.generateEcKeyPair() val encryptedSessionEstablishmentBytes = secureRepository.buildSessionEstablishment(requestData, deviceEngagementBytes, keyPair) return encryptedSessionEstablishmentBytes!! } For further information regarding generating the key pair and building the session establishment bytes, check the provided sample code.
      Step 2: Initiate a Verification Request with the AppLink
      Once the onGetMdocRequestData() function is ready, we can use the request() function to initiate the verification request.
      val sessionId = UUID.randomUUID().toString() val WALLET_PACKAGE = "com.samsung.android.spay" rpClientApis.request( WALLET_PACKAGE, sessionId, appLink, OnResponseListener(requestData) ) Processing the Request Response
      Once the mDoc request has been sent and processed successfully, the application should receive a ByteArray as response in the onMdocResponse() function inside the listener class. This ByteArray is an encrypted JSON object. Once decrypted, the response should look like the following:
      { "documents": [ { "issuerSigned": { "nameSpaces": { "org.iso.18013.5.1": [ "pGhkaWdlc3RJRBkU-mZyYW5kb21UaGNkNGduZDl5Z2I1cTRjaDV4ZnpxZWxlbWVudElkZW50aWZpZXJrZXhwaXJ5X2RhdGVsZWxlbWVudFZhbHVlwHQyMDMxLTExLTIxVDA3OjAwOjAwWg", "pGhkaWdlc3RJRBknbWZyYW5kb21Udjg1NmsydzIzZzQ3OHk5cTQ0aHJxZWxlbWVudElkZW50aWZpZXJsYWdlX2luX3llYXJzbGVsZW1lbnRWYWx1ZRgr", "pGhkaWdlc3RJRBlvWWZyYW5kb21UbnRtdnJ5OXlucXcyZjY2bmp2NXRxZWxlbWVudElkZW50aWZpZXJqaXNzdWVfZGF0ZWxlbGVtZW50VmFsdWXAdDIwMjMtMTEtMDhUMDc6MDA6MDBa", "pGhkaWdlc3RJRBnXQWZyYW5kb21UOXJqd2NydjZ6cXpqZm1xajNkcnhxZWxlbWVudElkZW50aWZpZXJrZmFtaWx5X25hbWVsZWxlbWVudFZhbHVlZUFoc2Fu" ] }, "issuerAuth": [ "dCBa", { "33": "..." }, "...", "..." ] }, "deviceSigned": {…}, "docType": "org.iso.18013.5.1.mDL" } ], "version": "1.0", "status": 0 } The values inside the org.iso.18013.5.1 JSON Array are the information we requested, in the CBOR (Concise Binary Object Representation) format.
      For example, if we decode the value: "pGhkaWdlc3RJRBlvWWZyYW5kb21UbnRtdnJ5OXlucXcyZjY2bmp2NXRxZWxlbWVudElkZW50aWZpZXJqaXNzdWVfZGF0ZWxlbGVtZW50VmFsdWXAdDIwMjMtMTEtMDhUMDc6MDA6MDBa", we find that this CBOR object contains the issue_date field and its value is 2023-11-08T07:00:00.000Z. Similarly, every value provided in the array is a CBOR object that can be decoded using CBOR decoders to find a key-value pair containing the requested information.
      We can now receive the mDoc response in the onMdocResponse() function and decode it to retrieve the final requested values:
      override fun onMdocResponse(encryptedResponseBytes: ByteArray) { val plainResponse = secureRepository.decryptMdocResponse(encryptedResponseBytes) Log.i(TAG, "plainResponse=${plainResponse?.toPrettyJson()}") val mDocContent = Mdoc18013Utils.parseMdocResponse(plainResponse!!) mDocContent.forEach { (key, value) -> Log.i(TAG, "$key: $value") } } Here, secureRepository.decryptMdocResponse() performs the decryption operation and converts the encrypted bytes into a plain JSON response. Afterwards, the Mdoc18013Utils.parseMdocResponse() function takes the plain response and decodes each CBOR-encoded element contained in the org.iso.18013.5.1 array and returns these values in a simplified dictionary of key-value pairs. If you wish to learn more about these functions, you can check out the provided sample code.
      With this step, the sample application's implementation of Verify with Wallet is complete. You can now build and run the application. In the sample application, once the user clicks the "Verify with Samsung Wallet" button, the VWW procedure is initiated. Once the user confirms that they wish to share their information, the application will receive the requested information about the user.
      Figure 2: Complete the verification process using VWW
      Conclusion
      In this article, we have explored how you can integrate the Verify with Wallet RP SDK directly into your application and use it to verify the user's identity. Feel free to integrate the RP SDK in your own application and test the Verify with Samsung Wallet process as well. If you have any further queries regarding this process, feel free to reach out to us through the Samsung Developers Forum.
      Related Resources
      ISO/IEC 18013-5:2021 - Personal identification — ISO-compliant driving licence — Part 5: Mobile driving licence (mDL) application Mobile Driver License - American Association of Motor Vehicle Administrators - AAMVA RP SDK download link Verify with Wallet API Guidelines Relying Party Card Specifications Sample Code Download Link View the full blog at its source
    • By Samsung Newsroom
      Digital identity verification has become a rising topic in the current technological landscape. Samsung Wallet allows Samsung Galaxy device users to securely register their state-issued US driver's license in their device, letting them use it as a mobile driver's license (mDL). Through the "Verify with Wallet" (VWW) functionality, Samsung Wallet provides Android developers with the ability to authenticate a user's identity directly from their application by utilizing the user's registered mDL on the device. The implementation of the functionality is based on and is fully compliant with the ISO 18013-5 standard. In this article, we explore the complete process of implementing Verify with Wallet in an Android application.
      Prerequisites
      In order to complete the tasks in this article and implement a complete sample application for verifying a user's identity, you need the following:
      Valid US driver's license or state ID US region Samsung Galaxy device with mDL support Complete the Samsung Wallet Partner onboarding process Understanding the Verify with Wallet process
      Samsung Wallet offers a native Relying Party (RP) SDK for Android applications. RP SDK is an App2App SDK designed for enabling Samsung Wallet's mDL service in online use cases. By integrating this SDK, you can leverage the VWW functionality within their applications.
      In your application, you need to create a JSON object for defining the request and a JSON payload for the Relying Party card. Then, you can utilize the RP SDK to create a valid mDoc request using the provided information. Finally, the request needs to be sent to the Samsung Wallet application.
      In response, Samsung Wallet sends an encrypted response back to the application, which contains the requested information in a CBOR encoded format. The application can then decode the provided data and use it as necessary. Refer to the ISO 18013-5 standard, AAMVA mDL guidelines and the Samsung Wallet documentation for a better understanding of the VWW process.
      Implementing the Verify with Wallet Functionality in Your Android Application
      The process of implementing VWW in an Android application includes creating a Relying Party card for Samsung Wallet, downloading and integrating the RP SDK into the Android application and implementing the necessary functions in the Android application for completing the verification process.
      Creating a Relying Party Wallet Card Template in the Samsung Wallet Partners Portal
      In order to implement and use the VWW functionality, you need a wallet card of the Relying Party type for this purpose.
      To create a Relying Party wallet card template:
      Go to the Samsung Wallet Partners Portal. Select Wallet Card > Create Wallet Cards. From Wallet Card Templates, select Relying Party. Select the applicable Service Location and Authentication Issuer from the Advanced setting section. Make sure to select the proper values for the card, otherwise the verification process may not work. Figure 1: Creating a Relying Party card for VWW
      Integrating the RP SDK in an Android Application
      Once the Relying Party card template has been created, we can download and integrate the RP SDK to work with the Android application.
      Step 1: Download the RP SDK for Android
      To download the RP SDK:
      Download the ZIP file containing the latest RP SDK release AAR file from Samsung Wallet Code Resources on the Samsung Developer website. Extract the AAR file from the downloaded ZIP file. Copy and paste the downloaded rp-sdk-x.xx-release.aar file inside a new directory in the Android Studio project (for example, \libs\). Step 2: Add Android Manifest Permissions
      To implement the Verify with Wallet functionality, the application needs both the Internet access permission and the ability to query the installed Samsung Wallet application. To provide the application with these permissions, open the AndroidManifest.xml file in the Android Studio project and add the following lines:
      <uses-permission android:name="android.permission.INTERNET" /> <queries> <package android:name="com.samsung.android.spay" /> </queries> Step 3: Add Gradle Dependencies
      In the application's build.gradle file, load the RP SDK AAR file and the necessary additional dependencies for using the SDK, as follows:
      // Load RP SDK AAR file implementation(files("libs/rp-sdk-1.05-release.aar")) //CBOR decoding dependencies implementation("com.upokecenter:cbor:4.0.1") implementation("com.augustcellars.cose:cose-java:1.1.0") // Other dependencies implementation("com.google.code.gson:gson:2.11.0") implementation("org.bouncycastle:bcprov-jdk15to18:1.66") implementation("com.nimbusds:nimbus-jose-jwt:9.37.3") implementation("io.reactivex.rxjava2:rxjava:2.2.21") implementation("io.reactivex.rxjava2:rxkotlin:2.4.0") implementation("io.reactivex.rxjava2:rxandroid:2.1.1") implementation("com.squareup.okhttp3:okhttp:4.11.0") After these steps, the RP SDK is ready for use in your Android application.
      Configuring the Android Application for Verify with Wallet
      Next, we need to complete the implementation of the Verify with Wallet functionality in your Android application.
      Step 1: Build a Card Payload for the Relying Party Card
      First, we need to create a request payload for the Relying Party card following the specification.
      private fun buildApp2AppPayload(): String { return PAYLOAD .replace("{refId}", UUID.randomUUID().toString()) .replace("{createdAt}", System.currentTimeMillis().toString()) .replace("{updatedAt}", System.currentTimeMillis().toString()) } private val PAYLOAD = """ { "card": { "type": "relyingparty", "data": [ { "createdAt": {createdAt}, "updatedAt": {updatedAt}, "language": "en", "refId": "{refId}", "attributes": { "clientPackageName": "com.ahsan.verifyappsample", "clientType": "app", "fontColor": "#ffffff", "logoImage": "https://kr-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/9/4/b940b7a2-0f55-42ce-8da7-025d50dbb6b7.png", "logoImage.darkUrl": "https://kr-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/9/4/b940b7a2-0f55-42ce-8da7-025d50dbb6b7.png", "logoImage.lightUrl": "https://kr-cdn-gpp.mcsvc.samsung.com/mcp25/resource/2024/9/4/b940b7a2-0f55-42ce-8da7-025d50dbb6b7.png", "providerName": "Samsung Verification Sample" } } ] } } """.trimIndent() Step 2: Build the AppLink
      The AppLink is a tokenized URL that is similar to the CData tokens used for Samsung Wallet cards. The Samsung Wallet RP SDK includes a function to generate the AppLink using the payload and the partner credentials (private key, public key, partner ID, card ID, certificate ID, etc.).
      To build the AppLink, you can simply call the rpClientApis.buildAppLink() function with the required parameters:
      val rpClientApis = RpClientApis(this) val appLink = rpClientApis.buildAppLink( partnerId = PARTNER_ID, cardId = CARD_ID, payload = buildApp2AppPayload(), samsungPublicKey = SAMSUNG_CERTIFICATE, partnerPublicKey = PARTNER_CERTIFICATE, partnerPrivateKey = PARTNER_PRIVATE_KEY, partnerCertificateId = CERTIFICATE_ID, isStagingServer = true ) Step 3: Build the Request Data
      Finally, once the AppLink creation is complete, we can send the verification request using the RP SDK.
      Before sending the request, we need to specify exactly which information we wish to retrieve. For this purpose, we need to create a JSON document following the ISO 18013-5 specification and specify the fields we wish to retrieve in the response. It is possible to request for the following fields in the request data under the "org.iso.18013.5.1" namespace:
      portrait family_name given_name document_number age_in_years resident_address birth_date issue_date expiry_date sex height weight_range weight eye_colour hair_colour organ_donor driving_privileges veteran Additionally, it is also possible to request for the following 3 fields, under the "org.iso.18013.5.1.aamva" namespace:
      domestic_driving_privileges DHS_compliance EDL_credential In our example, we only try to retrieve the following 4 fields: family_name, age_in_years, issue_date, and expiry_date. In the following code example, we build the request string accordingly:
      val requestData = """ { "docType": "org.iso.18013.5.1.mDL", "nameSpaces": { "org.iso.18013.5.1": { "family_name": true, "age_in_years": true, "issue_date": true, "expiry_date": true } } } """.trimIndent() Step 4: Create the OnResponseListener Class
      When using the VWW RP SDK, it is necessary to create a listener class for both sending the request and for receiving and processing the response from the mDoc server.
      For our example, let's create an empty placeholder OnResponseListener class which extends the RP SDK's OnResponseListener class.
      class OnResponseListener(private val requestData: String) : RpClientApis.OnResponseListener{ override fun onGetMdocRequestData(deviceEngagementBytes: ByteArray): ByteArray? { TODO("Not yet implemented") } override fun onMdocResponse(encryptedResponseBytes: ByteArray) { TODO("Not yet implemented") } override fun onMdocResponseFailed(exception: Exception) { Log.e(TAG, "Response processing failed", exception) } } Initiating the Verification Request
      To initiate the identity verification process, we need to establish a secure session and send a structured request to the Samsung Wallet application. We can use the previously created OnResponseListener class for this purpose.
      Step 1: Define the onGetMdocRequestData() Function for Sending the Request Data
      Inside the onGetMdocRequestData() function, we need to do 2 things for establishing a secure encrypted session:
      Generate an elliptic curve key pair Build session establishment bytes following the ISO-18013-5 specification. Once the key pair is generated, we can use this key pair, the device engagement bytes, and the previously created request data for building the encrypted session establishment bytes. The device engagement bytes are provided automatically inside the onGetMdocRequestData() function by the RP client SDK.
      private val secureRepository = SecureRepository() override fun onGetMdocRequestData(deviceEngagementBytes: ByteArray): ByteArray? { val keyPair = secureRepository.generateEcKeyPair() val encryptedSessionEstablishmentBytes = secureRepository.buildSessionEstablishment(requestData, deviceEngagementBytes, keyPair) return encryptedSessionEstablishmentBytes!! } For further information regarding generating the key pair and building the session establishment bytes, check the provided sample code.
      Step 2: Initiate a Verification Request with the AppLink
      Once the onGetMdocRequestData() function is ready, we can use the request() function to initiate the verification request.
      val sessionId = UUID.randomUUID().toString() val WALLET_PACKAGE = "com.samsung.android.spay" rpClientApis.request( WALLET_PACKAGE, sessionId, appLink, OnResponseListener(requestData) ) Processing the Request Response
      Once the mDoc request has been sent and processed successfully, the application should receive a ByteArray as response in the onMdocResponse() function inside the listener class. This ByteArray is an encrypted JSON object. Once decrypted, the response should look like the following:
      { "documents": [ { "issuerSigned": { "nameSpaces": { "org.iso.18013.5.1": [ "pGhkaWdlc3RJRBkU-mZyYW5kb21UaGNkNGduZDl5Z2I1cTRjaDV4ZnpxZWxlbWVudElkZW50aWZpZXJrZXhwaXJ5X2RhdGVsZWxlbWVudFZhbHVlwHQyMDMxLTExLTIxVDA3OjAwOjAwWg", "pGhkaWdlc3RJRBknbWZyYW5kb21Udjg1NmsydzIzZzQ3OHk5cTQ0aHJxZWxlbWVudElkZW50aWZpZXJsYWdlX2luX3llYXJzbGVsZW1lbnRWYWx1ZRgr", "pGhkaWdlc3RJRBlvWWZyYW5kb21UbnRtdnJ5OXlucXcyZjY2bmp2NXRxZWxlbWVudElkZW50aWZpZXJqaXNzdWVfZGF0ZWxlbGVtZW50VmFsdWXAdDIwMjMtMTEtMDhUMDc6MDA6MDBa", "pGhkaWdlc3RJRBnXQWZyYW5kb21UOXJqd2NydjZ6cXpqZm1xajNkcnhxZWxlbWVudElkZW50aWZpZXJrZmFtaWx5X25hbWVsZWxlbWVudFZhbHVlZUFoc2Fu" ] }, "issuerAuth": [ "dCBa", { "33": "..." }, "...", "..." ] }, "deviceSigned": {…}, "docType": "org.iso.18013.5.1.mDL" } ], "version": "1.0", "status": 0 } The values inside the org.iso.18013.5.1 JSON Array are the information we requested, in the CBOR (Concise Binary Object Representation) format.
      For example, if we decode the value: "pGhkaWdlc3RJRBlvWWZyYW5kb21UbnRtdnJ5OXlucXcyZjY2bmp2NXRxZWxlbWVudElkZW50aWZpZXJqaXNzdWVfZGF0ZWxlbGVtZW50VmFsdWXAdDIwMjMtMTEtMDhUMDc6MDA6MDBa", we find that this CBOR object contains the issue_date field and its value is 2023-11-08T07:00:00.000Z. Similarly, every value provided in the array is a CBOR object that can be decoded using CBOR decoders to find a key-value pair containing the requested information.
      We can now receive the mDoc response in the onMdocResponse() function and decode it to retrieve the final requested values:
      override fun onMdocResponse(encryptedResponseBytes: ByteArray) { val plainResponse = secureRepository.decryptMdocResponse(encryptedResponseBytes) Log.i(TAG, "plainResponse=${plainResponse?.toPrettyJson()}") val mDocContent = Mdoc18013Utils.parseMdocResponse(plainResponse!!) mDocContent.forEach { (key, value) -> Log.i(TAG, "$key: $value") } } Here, secureRepository.decryptMdocResponse() performs the decryption operation and converts the encrypted bytes into a plain JSON response. Afterwards, the Mdoc18013Utils.parseMdocResponse() function takes the plain response and decodes each CBOR-encoded element contained in the org.iso.18013.5.1 array and returns these values in a simplified dictionary of key-value pairs. If you wish to learn more about these functions, you can check out the provided sample code.
      With this step, the sample application's implementation of Verify with Wallet is complete. You can now build and run the application. In the sample application, once the user clicks the "Verify with Samsung Wallet" button, the VWW procedure is initiated. Once the user confirms that they wish to share their information, the application will receive the requested information about the user.
      Figure 2: Complete the verification process using VWW
      Conclusion
      In this article, we have explored how you can integrate the Verify with Wallet RP SDK directly into your application and use it to verify the user's identity. Feel free to integrate the RP SDK in your own application and test the Verify with Samsung Wallet process as well. If you have any further queries regarding this process, feel free to reach out to us through the Samsung Developers Forum.
      Related Resources
      ISO/IEC 18013-5:2021 - Personal identification — ISO-compliant driving licence — Part 5: Mobile driving licence (mDL) application Mobile Driver License - American Association of Motor Vehicle Administrators - AAMVA RP SDK download link Verify with Wallet API Guidelines Relying Party Card Specifications Sample Code Download Link View the full blog at its source
    • By Samsung Newsroom
      May 2025 New Application Promotion Feature to Highlight Your Application in Galaxy Store
      Introducing a new opportunity to increase your application’s visibility on the Galaxy Store! The Seller Portal has launched a new application promotion feature to highlight your application on the Galaxy Store. Developers can now request that their game, application, or theme is showcased in an editorial created for the Galaxy Store’s "Discover" tab. Available to users in the US and South Korea, the "Discover" tab is where discovery meets inspiration, highlighting the best content and original stories on mobile and tablet. The tab’s editorials provide users with curated recommendations on the latest trends, benefits and features exclusive to Galaxy, seasonal events, editors’ tips, and more, combining storytelling and visuals to enrich the user experience and showcase innovation. Check out our Seller Portal to learn more about having your application appear in an editorial and what you need to apply.

      Learn More Integrate Your Devices Easily with Device Profile Builder
      SmartThings continues to invest in the Developer Center by creating new tools for partners and has recently added the Device Profile Builder, a web-based tool that helps developers create a profile to define a device and its features on the SmartThings platform. The tool makes designing your device for SmartThings easier than ever. There are templates for different smart home device types, making it easy to get started, along with opportunities for customization.

      To learn more about the Device Profile Builder, see our blog article on the new tool. Meet the Samsung Galaxy S25 Edge: an Engineering Marvel of New Slim Hardware Innovation
      On May 13, Samsung unveiled their latest ultra-slim smartphone at the "Galaxy S25 Edge: Beyond Slim" event. At just 5.8 mm thin and weighing only 163 g, the Galaxy S25 Edge is the slimmest device in the Galaxy S series to date, combining sleek style with portability. The device features a titanium frame as well as Corning® Gorilla® Glass Ceramic 2 on the front display, a next-generation material designed to boost durability. Equipped with a 200-megapixel camera and enhanced AI capabilities, the Galaxy S25 Edge delivers an even more intelligent and powerful experience. Learn more about the Galaxy S25 Edge and its spectacular performance at the Samsung Electronics Newsroom.

      Learn More Tutorial: Reading and Converting Galaxy Watch Accelerometer Data
      Accessing accelerometer data from your Galaxy Watch opens up endless opportunities to build motion-aware applications—from fitness tools to gesture-controlled interfaces. With the proper setup and data handling, an application running on Galaxy Watch powered by Wear OS can deliver accurate, real-time motion insights to users. This tutorial walks you through everything you need to know, from setting up your Wear OS project to reading and converting sensor data. Explore the sample application included with the guide to test motion features yourself!

      Learn More Exploring a Simple Siamese Network for High-Resolution Video Quality Assessment
      Video Quality Assessment (VQA) is becoming increasingly important as popular smart devices make producing high-quality video and high-resolution user-generated content (UGC) part of everyday life. However, the computational burden for high-resolution video and the diversity of content present new challenges for efficient and effective VQA.

      To address these challenges, Samsung R&D Institute China-Nanjing presents SiamVQA, a Siamese network that considers both technical and aesthetic quality perspectives. Sharing a common feature extractor (Swin-T), SiamVQA employs a simple network design based on dual cross-attention to enhance the semantic perception ability for more accurate quality prediction. As a result, SiamVQA has achieved state-of-the-art accuracy on high-resolution benchmarks, proving to be both efficient and effective. Learn more about the next-generation VQA model that opens up the possibilities for Siamese networks on the Samsung Research blog.

      Learn More On-Device Hand Model for Robust Gesture Detection
      Hand gesture recognition technology enables more natural and intuitive ways to communicate. Unlike traditional input methods like keyboards or touchscreens, users can express intentions and commands through everyday movements and postures. Gesture-based interaction is also inclusive, offering greater accessibility for people with physical disabilities who may have difficulty using conventional input methods. Thanks to these advantages, hand gesture recognition is becoming an increasingly important area of research in different fields such as human-computer interaction systems, sign language translation, VR/AR, and remote-control applications. 

      In this blog article, we introduce an on-device AI model that delivers fast and accurate performance across a range of environments. Explore this key solution from Samsung R&D Institute Ukraine, from a neural network architecture to resolve multimodal tasks to a novel multi-cascade structure for handling simultaneous tasks at once.

      Learn More Single-Channel Distance-Based Source Separation for Mobile GPU in Outdoor and Indoor Environments
      Distance-based source separation (DSS) separates audio sources into "near" or "far" groups based on their distance from a microphone. Unlike traditional source separation approaches, DSS uses spatial cues—such as the inverse square law of sound intensity, direct-to-reverberation ratio (DRR), and other distance-based acoustic effects—to separate a mixed audio signal into components by distance. However, most previous DSS research has focused on indoor scenarios. This makes it difficult to address the challenges of ambient noise and unclear reverberant boundaries in outdoor environments, and of real-time processing speed and accuracy on mobile devices.

      To tackle this difficulty, AI Solution Team at Samsung Research proposes a new single-channel DSS model for on-device mobile environments. This model performs robustly in both indoor and outdoor scenarios. Key innovations of the model include a two-stage Conformer architecture for capturing complex audio dependencies, a linear relation-aware self-attention (RSA) mechanism for efficiency, and mobile GPU acceleration optimization using the TensorFlow Lite (TFLite) GPU delegate, which enables real-time running on mobile devices. Learn about how this new model achieves accurate and effective far/near voice and sound separation even in noisy outdoor environments and its on-device performance on the Samsung Research blog.

      Learn More View the full blog at its source
    • Government UFO Files
    • By Samsung Newsroom
      Samsung In-App Purchase (IAP) offers developers a robust solution for handling digital transactions within mobile applications available on Galaxy Store. Whether it is selling digital goods, handling subscriptions, or managing refunds, Samsung IAP is designed to offer a smooth, secure experience. The Samsung IAP Orders API expands the scope of these benefits. You can fetch all the payments and refunds history according to specified dates. This content guides you through the essential components for implementing both the Samsung IAP and Samsung IAP Orders APIs.
      Figure 1: Sample Application UI In this tutorial, we provide a sample application called Book Spot, which offers users the option to subscribe to their favorite books and consumable items, such as text fonts, for purchase. After purchase, users can consume the item. Finally, developers can view all their payment and refund history on specific dates by calling the Samsung IAP Orders API from the back-end server.
      Prerequisites
      Before implementing in-app purchases in your app, do the following to enable a smooth and effective execution of the process while developing your own application:
      Integrate the Samsung IAP SDK into your application. For more information about the IAP SDK integration, you can follow the Integration of Samsung IAP Services in Android Apps article. Upload the application for Beta testing on Samsung Galaxy Store. A step-by-step guide with screenshots has been provided in the documentation. For more details, see the section “Production Closed Beta Test” on the Test Guide. Finally, create items on the Seller Portal so that users can purchase or subscribe to them while using the application. For more details about the available items that the Seller Portal supports, see the Programming Guide. For the sample application, we have already completed these steps. Some example items were already created in Seller Portal, such as books and fonts so that you can consume and subscribe to them while using this sample application.
      Implementation of Item Purchase
      Now that the application and items are ready, you can implement the purchase functionality in your application like in the sample below:
      When clicking "Buy," the startPayment() method is called, specifying parameters for item ID and the OnPaymentListener interface, which handles the results of the payment transaction. The onPayment() callback returns whether the purchase has succeeded or failed. The purchaseVo object is instantiated and in case it is not null, it holds the purchase results. If the purchase is successful, then it validates the purchase showing its ID. If the purchase is not successful, a purchaseError message is shown. For more information, check the Purchase an in-app item section. iapHelper.startPayment(itemId, String.valueOf(1), new OnPaymentListener() { @Override public void onPayment(@NonNull ErrorVo errorVo, @Nullable PurchaseVo purchaseVo) { if (purchaseVo != null) { // Purchase Successful Log.d("purchaseId" , purchaseVo.getPurchaseId().toString()); Toast.makeText(getApplicationContext() ,"Purchase Successfully", Toast.LENGTH_SHORT).show(); } else { Log.d("purchaseError" , errorVo.toString()); Toast.makeText(getApplicationContext() ,"Purchase Failed", Toast.LENGTH_SHORT).show(); } } }); Implementation of Item Consumption
      After successfully purchasing an item, the user can then consume it. In the sample code below, when "Consumed" is selected, the consumePurchaseItems() triggers the consume functionality. This is necessary as items must be marked as consumed so they can be purchased again:
      The consumePurchaseItems() method is called specifying the parameters for purchaseId and the OnConsumePurchasedItemsListener() interface, which handles the item data and results. This code also checks if consuming the purchased items succeeded or failed: If the errorVo parameter is not null and there is no error with the purchase, which can be verified with the IAP_ERROR_NONE response code, then the “Purchase Acknowledged” message is displayed. However, if there is an error, the errorVo parameter returns an error description with the getErrorString() getter, along with the “Acknowledgment Failed” message. iapHelper.consumePurchasedItems(purchaseId, new OnConsumePurchasedItemsListener() { @Override public void onConsumePurchasedItems(@NonNull ErrorVo errorVo, @NonNull ArrayList<ConsumeVo>arrayList) { if (errorVo != null && errorVo.getErrorCode() == iapHelper.IAP_ERROR_NONE) { Toast.makeText(getApplicationContext() ,"Purchase Acknowledged", Toast.LENGTH_SHORT).show(); } else { Toast.makeText(getApplicationContext(), "Acknowledgment Failed: " + errorVo.getErrorString(), Toast.LENGTH_SHORT).show(); } } }); Implementation of Item Subscription
      Besides purchasing and consuming items, you can also subscribe to them in your applications. Similar to the validation done for the consumable item purchase, you validate the subscription with a purchase ID if the purchase is successful. Use the same code snippet specified for “Item Purchase.” For more information, check the Implementation of Item Purchase section.
      Implementation of the Samsung IAP Orders API
      The Samsung IAP Orders API is used to view all payments and refunds on a specific date. It does this by fetching the payments and refunds history within the date you specified. Let’s implement the Samsung IAP Orders API and create a server to listen to its notifications. Through server-to-server communication, the API returns all orders data for the application.
      Configuring the Server
      You can develop a Spring Boot server for this purpose. Here are the guidelines on how to set up this server:
      Set up a Spring Boot Project. For more information, follow the steps on Developing Your First Spring Boot Application. Set up your server endpoint: Create a controller for the Samsung IAP Orders API in an integrated development environment (IDE) after importing the Spring Boot project you created. This helps managing all in-app order-related activities and processing them within your application.
      The controller receives POST requests sent from Samsung’s IAP orders service ensuring the communication with your application.
      Get Payment and Refund History
      To view all payments and refunds:
      You must make a POST request to the Samsung IAP Orders API endpoint with the required headers specified below. If you specify a date, all the payment history for this date is returned. Otherwise, it only returns all the data from the day before the current date. API Endpoint: https://devapi.samsungapps.com/iap/seller/orders
      Method: POST
      Headers:
      Add the following fields to the request header. For more information, see the Create an Access Token page, which helps you understand how to create the access token in detail. The token is used for authorization. You can also get the Service Account ID by clicking the Assistance > API Service tabs on Seller Portal. For more details, read the section Create a service account and visit Seller Portal.
      Header Name
      Description
      Required/Optional
      Values
      Content-Type
      Format of the request body
      Required
      application/json
      Authorization
      Authorization security header
      Required
      Bearer: access_token
      Service Account ID
      This ID can be created in Seller Portal and is used to generate the JSON Web Token (JWT)
      Required
      service-account-id
      Parameters:
      The following parameters can be used to build your POST request.
      Name
      Type
      Required/Optional
      Description
      sellerSeq
      String
      Required
      Your seller deeplink, which is found in your profile in Seller Portal and consists of a 12-digit number.
      packageName
      String
      Optional
      Used to view payment and refund data. You can provide the application package name. When a package name is not specified, the data for all applications is shown.
      requestDate
      String
      Optional
      Specify a date from which to view the payment and refund data. If the date is not specified, the data from a day before your current date is returned.
      continuationToken
      String
      Optional
      Use this if you want to check if there is a continuation for the data on the next page. If there is no more data, the response is null.
      To implement REST API support, add the following OkHttp library dependencies to your application's build.gradle file:
      implementation 'com.squareup.okhttp3:okhttp: version' implementation 'com.google.code.gson:gson: version' A detailed description of the request items can be found in the Request section of the Samsung IAP Orders API documentation. For more information on the server communication, see Samsung IAP Server API. Here is a brief summary of the code below:
      A POST request is mapped to the /orders URL, which logs the request. The previously described parameters containing the data you specified are formatted in a JSON body using the String.format() method. The outgoing request is logged in a JSON body format. A RequestBody is instantiated containing the JSON data, formatted for an HTTP request to be sent to the server with the specified token and Service Account ID. This code also handles multiple results your request can return: The onFailure() method is called when the network request fails for some reason, providing any error details using the IOException exception. If the request succeeds, the onResponse() method returns the response body or any response exception found. @RestController @RequestMapping(value = "/iap", method = RequestMethod.POST) public class OrdersController { private final OkHttpClient client = new OkHttpClient(); @GetMapping("/orders") public void sendToServer() { System.out.println("POST request received"); // Log the request // Define parameters values, use according to your requirement // String packageName = "com.example.app_name "; // String requestDate = "20240615"; // String continuationToken = "XXXXXXXXXXX…….XXXXXX"; String sellerSeq = "0000000XXXXX"; // Create the JSON body, use packageName, requestDate, continuationToken according to your requirement String jsonBody = String.format( "{\"sellerSeq\":\"%s\"}", sellerSeq ); // Create the request body RequestBody body = RequestBody.create(jsonBody, MediaType.parse("application/json; charset=utf-8")); // Access token String token = "0DjT9yzrYUKDoGbVUlXXXXXX"; // Build the request Request request = new Request.Builder() .url("https://devapi.samsungapps.com/iap/seller/orders") .post(body) .addHeader("Authorization","Bearer " + token) .addHeader("service-account-id", "85412253-21b2-4d84-8ff5-XXXXXXXXXXXX") .addHeader("content-type", "application/json") .build(); client.newCall(request).enqueue(new Callback() { @Override public void onFailure(@NotNull Call call, @NotNull IOException e) { System.err.println("Request failed: " + e.getMessage()); } @Override public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException { if (response.isSuccessful()) { String responseBody = response.body().string(); System.out.println("Response: " + responseBody); } else { System.err.println("Unexpected response code: " + response.code()); System.err.println("Response body: " + response.body().string()); } response.close(); // Close the response body } }); } } Congratulations! You have just built the Spring Boot server to handle API POST requests using the OkHttpClient to manage HTTP requests and responses for your sample application.
      Example Response
      As previously mentioned, a JSON-formatted response is returned to your request. For detailed descriptions of each response body element, see the “Response” section of the Samsung IAP Orders API documentation. The following output format is a sample in which only some of the response-body data is presented.
      In this case, the continuationToken parameter key returns null because there is no continuation for the data on the next page. The orderItemList parameter key lists all the orders with specific details, such as orderId, countryId, packageName, among others. { "continuationToken": null, "orderItemList": [ { "orderId": "S20230210KR019XXXXX", "purchaseId": "a778b928b32ed0871958e8bcfb757e54f0bc894fa8df7dd8dbb553cxxxxxxxx", "contentId": "000005059XXX", "countryId": "USA", "packageName": "com.abc.xyz" }, { "orderId": "S20230210KR019XXXXX", "purchaseId": "90a5df78f7815623eb34f567eb0413fb0209bb04dad1367d7877edxxxxxxxx", "contentId": "000005059XXX", "countryId": "USA", "packageName": "com.abc.xyz" }, ] } Usually, the responses contain all the relevant information about user purchases, such as the in-app item title, price, and payment status. Therefore, you can use the information and create views for an easier order management.
      NoteIf the IAP operating mode is configured to test mode, the API response is empty. This is because the API is configured to operate and return a response only in production mode. Conclusion
      You have learned how to implement item purchase, consumption, and registration, as well as how to integrate the Samsung IAP Orders API and configure a server to fetch all the payment and refund history within specific dates.
      Integrating the Samsung IAP Orders API functionality into your server is an essential step in managing your application payments history to ensure a seamless experience to users. Now, you can implement the Samsung IAP Orders API into your application to track all payments, refunds and make your business more manageable.
      Related Resources
      For additional information on this topic, see the resources below:
      Download the Android Sample Application Source Code Add Samsung In-App Purchase service to your app Samsung IAP Orders API Integration of Samsung IAP Services in Android Apps View the full blog at its source





×
×
  • Create New...