diff --git a/.idea/other.xml b/.idea/other.xml
deleted file mode 100644
index 94c96f6..0000000
--- a/.idea/other.xml
+++ /dev/null
@@ -1,318 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..931b96c
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/MobileSdk/build.gradle.kts b/MobileSdk/build.gradle.kts
index 0459155..34b3cfa 100644
--- a/MobileSdk/build.gradle.kts
+++ b/MobileSdk/build.gradle.kts
@@ -77,7 +77,7 @@ nmcp {
android {
namespace = "com.spruceid.mobile.sdk"
- compileSdk = 33
+ compileSdk = 35
defaultConfig {
minSdk = 26
diff --git a/build.gradle.kts b/build.gradle.kts
index d848fb4..9cb12ee 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -1,8 +1,8 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
- id("com.android.application") version "8.5.1" apply false
+ id("com.android.application") version "8.7.0" apply false
id("org.jetbrains.kotlin.android") version "1.9.23" apply false
- id("com.android.library") version "8.5.1" apply false
+ id("com.android.library") version "8.7.0" apply false
id("com.gradleup.nmcp") version "0.0.4" apply true
id("com.google.devtools.ksp") version "1.9.23-1.0.20" apply false
}
diff --git a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt
index 36574e4..45ff6e9 100644
--- a/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt
+++ b/example/src/main/java/com/spruceid/mobilesdkexample/wallet/WalletHomeView.kt
@@ -7,18 +7,23 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
+import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
+import androidx.compose.material3.Button
+import androidx.compose.material3.ButtonDefaults
import androidx.compose.foundation.lazy.LazyColumn
import androidx.compose.foundation.lazy.items
import androidx.compose.foundation.shape.RoundedCornerShape
+import androidx.compose.material3.Icon
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.collectAsState
import androidx.compose.runtime.getValue
import androidx.compose.runtime.rememberCoroutineScope
+import androidx.compose.ui.graphics.Color
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip
@@ -47,7 +52,10 @@ fun WalletHomeView(
.padding(top = 20.dp)
) {
WalletHomeHeader(navController = navController)
- WalletHomeBody(rawCredentialsViewModel = rawCredentialsViewModel)
+ WalletHomeBody(
+ rawCredentialsViewModel = rawCredentialsViewModel,
+ navController = navController
+ )
}
}
@@ -86,33 +94,73 @@ fun WalletHomeHeader(navController: NavController) {
}
@Composable
-fun WalletHomeBody(rawCredentialsViewModel: IRawCredentialsViewModel) {
+fun WalletHomeBody(
+ rawCredentialsViewModel: IRawCredentialsViewModel,
+ navController: NavController
+) {
val scope = rememberCoroutineScope()
val rawCredentials by rawCredentialsViewModel.rawCredentials.collectAsState()
if(rawCredentials.isNotEmpty()) {
- LazyColumn(
- Modifier
- .fillMaxWidth()
- .padding(top = 20.dp)
- ) {
- items(rawCredentials) { rawCredential ->
- AchievementCredentialItem(
- rawCredential.rawCredential,
- onDelete = {
- scope.launch {
- rawCredentialsViewModel.deleteRawCredential(id = rawCredential.id)
+ Column {
+ LazyColumn(
+ Modifier
+ .fillMaxWidth()
+ .padding(top = 20.dp)
+ ) {
+ items(rawCredentials) { rawCredential ->
+ AchievementCredentialItem(
+ rawCredential.rawCredential,
+ onDelete = {
+ scope.launch {
+ rawCredentialsViewModel.deleteRawCredential(id = rawCredential.id)
+ }
}
+ ).component()
+ }
+ // item {
+ // vcs.map { vc ->
+ // GenericCredentialListItems(vc = vc)
+ // }
+ // ShareableCredentialListItems(mdocBase64 = mdocBase64)
+ // }
+ }
+
+ Box(
+ modifier = Modifier.fillMaxSize(), // Fill the entire screen
+ contentAlignment = Alignment.BottomCenter // Align content to the bottom center
+ ) {
+ Button(
+ onClick = {
+ navController.navigate(Screen.OID4VPScreen.route)
+ },
+ modifier = Modifier.fillMaxWidth(),
+ colors = ButtonDefaults.buttonColors(
+ containerColor = Color.Blue,
+ contentColor = Color.White,
+ )
+ ) {
+ Row(
+ verticalAlignment = Alignment.CenterVertically, // Align items vertically
+ modifier = Modifier.padding(8.dp) // Add padding to the button content
+ ) {
+ // Add the QR icon here
+ Icon(
+ painter = painterResource(id = R.drawable.scan_qr_code), // Replace with your QR code drawable resource
+ contentDescription = "QR Code Icon", // Accessibility description
+ tint = Color.White, // Icon color
+ modifier = Modifier.padding(end = 10.dp) // Space between icon and text
+ )
+ Text(
+ text = "Scan to share",
+ fontFamily = Inter, // Ensure you have the Inter font available
+ fontWeight = FontWeight.Normal,
+ fontSize = 15.sp,
+ )
}
- ).component()
+ }
}
-// item {
-// vcs.map { vc ->
-// GenericCredentialListItems(vc = vc)
-// }
-// ShareableCredentialListItems(mdocBase64 = mdocBase64)
-// }
}
} else {
Column {
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index b82aa23..09523c0 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME