Feat(Tis): DeviceInfo and Build applicationId

Send Device name and AndroidId in DeviceInfo,
Handle multiple release version with different version number and application Id for each psp
This commit is contained in:
Amir Mousavi
2026-05-09 20:30:14 +03:30
parent d73df5524e
commit fe17187df2
16 changed files with 110 additions and 73 deletions
@@ -0,0 +1,24 @@
package com.example.core
import android.annotation.SuppressLint
import android.content.Context
import android.os.Build
import android.provider.Settings
fun getDeviceName(): String {
val manufacturer = Build.MANUFACTURER
val model = Build.MODEL
return if (model.startsWith(manufacturer, ignoreCase = true)) {
model
} else {
"$manufacturer $model"
}
}
@SuppressLint("HardwareIds")
fun getAndroidId(context: Context): String {
return Settings
.Secure
.getString(context.contentResolver, Settings.Secure.ANDROID_ID)
}
@@ -1,9 +0,0 @@
package com.example.core.data
import com.example.core.domain.AppConfig
class AppConfigImpl : AppConfig{
override fun androidId(id: String): String {
return "window.WebV.onUUID($id);"
}
}
@@ -1,8 +1,6 @@
package com.example.core.di
import com.example.core.data.AppConfigImpl
import com.example.core.data.PaymentResultImpl
import com.example.core.domain.AppConfig
import com.example.core.domain.PaymentResult
import com.google.gson.Gson
import dagger.Module
@@ -25,9 +23,4 @@ class CoreModule {
): PaymentResult = PaymentResultImpl(
gson = gson
)
@Provides
fun provideAppConfig(
gson: Gson
): AppConfig = AppConfigImpl()
}
@@ -1,7 +0,0 @@
package com.example.core.domain
import com.example.core.model.PaymentResultEntity
interface AppConfig {
fun androidId(id : String) : String
}
@@ -0,0 +1,6 @@
package com.example.core.model
data class DeviceInfo(
val androidId: String,
val deviceName: String
)