Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit

Permalink
Upgrade to latest version of mobile-sdk-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
cobward committed Oct 22, 2024
1 parent cbd27bd commit 093736b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion MobileSdk/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ android {
}

dependencies {
api("com.spruceid.mobile.sdk.rs:mobilesdkrs:0.0.36")
api("com.spruceid.mobile.sdk.rs:mobilesdkrs:0.1.0")
//noinspection GradleCompatible
implementation("com.android.support:appcompat-v7:28.0.0")
/* Begin UI dependencies */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class IsoMdlPresentation(
var itemsRequests: List<ItemsRequest> = listOf()
var bleManager: Transport? = null

suspend fun initialize() {
fun initialize() {
try {
session = initializeMdlPresentationFromBytes(this.mdoc, uuid.toString())
this.bleManager = Transport(this.bluetoothManager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class StorageManager(val context: Context) : StorageManagerInterface {
/// Arguments:
/// key - The key to add
/// value - The value to add under the key
override suspend fun add(key: String, value: ByteArray) =
override fun add(key: String, value: ByteArray) =
context.openFileOutput(filename(key), 0).use { it.write(encrypt(value)) }


Expand All @@ -23,7 +23,7 @@ class StorageManager(val context: Context) : StorageManagerInterface {
///
/// Arguments:
/// key - The key to retrieve
override suspend fun get(key: String): ByteArray {
override fun get(key: String): ByteArray {
val bytes = ByteArray(0)
context.openFileInput(filename(key)).use { it.read(bytes) }
return decrypt(bytes)
Expand All @@ -35,15 +35,15 @@ class StorageManager(val context: Context) : StorageManagerInterface {
///
/// Arguments:
/// key - The key to remove
override suspend fun remove(key: String) {
override fun remove(key: String) {
File(context.filesDir, filename(key)).delete()
}


/// Function: list
///
/// Lists all key-value pair in storage
override suspend fun list(): List<String> {
override fun list(): List<String> {
val list = context.filesDir.list() ?: throw Exception("cannot list stored objects")

return list.mapNotNull {
Expand Down

0 comments on commit 093736b

Please sign in to comment.