Skip to content

Commit

Permalink
refactor: added device info to confirm call (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
manideepk90 authored Jan 3, 2025
1 parent d4d85a4 commit 0e9cd39
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/src/main/java/io/hyperswitch/react/Utils.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package io.hyperswitch.react

import android.os.Build
import android.content.Context
import android.net.wifi.WifiManager
import android.os.Bundle
Expand Down Expand Up @@ -100,7 +100,9 @@ class Utils {
hyperParams.putString("ip", getDeviceIPAddress(context))
hyperParams.putDouble("launchTime", getCurrentTime())
hyperParams.putString("sdkVersion", BuildConfig.VERSION_NAME)

hyperParams.putString("device_model", Build.MODEL)
hyperParams.putString("os_type", "android")
hyperParams.putString("os_version", Build.VERSION.RELEASE)
request.putBundle("hyperParams", hyperParams)

val bundle = Bundle()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package io.hyperswitch.paymentsession
import android.app.Activity
import android.content.Context
import android.net.wifi.WifiManager
import android.os.Build
import android.os.Bundle
import android.webkit.WebSettings
import io.hyperswitch.PaymentConfiguration
Expand All @@ -21,6 +22,9 @@ class LaunchOptions(private val activity: Activity? = null) {
putString("ip", getDeviceIPAddress(activity))
putDouble("launchTime", getCurrentTime())
putString("sdkVersion", BuildConfig.VERSION_NAME)
putString("device_model", Build.MODEL)
putString("os_type", "android")
putString("os_version", Build.VERSION.RELEASE)
configuration?.disableBranding?.let {
putBoolean(
"disableBranding", it
Expand All @@ -41,6 +45,9 @@ class LaunchOptions(private val activity: Activity? = null) {
plus(Pair("ip", getDeviceIPAddress(activity)))
plus(Pair("launchTime", getCurrentTime()))
plus(Pair("sdkVersion", BuildConfig.VERSION_NAME))
plus(Pair("device_model", Build.MODEL))
plus(Pair("os_type", "android"))
plus(Pair("os_version", Build.VERSION.RELEASE))
}

fun getBundle(
Expand Down

0 comments on commit 0e9cd39

Please sign in to comment.