INJIMOB-3471: Renamed SampleAppVCIclient to SampleCredentialWallet and updated all package references (#2115)

Signed-off-by: Kaushik Gupta <kausgpt97@gmail.com>
This commit is contained in:
Kaushik Gupta
2025-11-03 23:26:12 +05:30
committed by GitHub
parent 446524dc72
commit 140b6beac3
60 changed files with 72 additions and 69 deletions

View File

@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.SampleAppVCIClient" parent="android:Theme.Material.Light.NoActionBar" />
</resources>

View File

@@ -5,11 +5,11 @@ plugins {
}
android {
namespace = "com.example.sampleappvciclient"
namespace = "com.example.samplecredentialwallet"
compileSdk = 35
defaultConfig {
applicationId = "com.example.sampleappvciclient"
applicationId = "com.example.samplecredentialwallet"
minSdk = 26
targetSdk = 35
versionCode = 1

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient
package com.example.samplecredentialwallet
import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4
@@ -19,6 +19,6 @@ class ExampleInstrumentedTest {
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.example.sampleappvciclient", appContext.packageName)
assertEquals("com.example.samplecredentialwallet", appContext.packageName)
}
}

View File

@@ -22,14 +22,14 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.SampleAppVCIClient"
android:theme="@style/Theme.SampleCredentialWallet"
tools:targetApi="31">
<activity
android:name="com.example.sampleappvciclient.MainActivity"
android:name="com.example.samplecredentialwallet.MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.SampleAppVCIClient"
android:theme="@style/Theme.SampleCredentialWallet"
android:launchMode="singleTop">
<!-- Launcher -->

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient
package com.example.samplecredentialwallet
import android.content.Intent
import android.net.Uri
@@ -11,9 +11,9 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.lifecycle.lifecycleScope
import androidx.navigation.NavHostController
import androidx.navigation.compose.rememberNavController
import com.example.sampleappvciclient.navigation.AppNavHost
import com.example.sampleappvciclient.utils.SecureKeystoreManager
import com.example.sampleappvciclient.utils.AuthCodeHolder
import com.example.samplecredentialwallet.navigation.AppNavHost
import com.example.samplecredentialwallet.utils.SecureKeystoreManager
import com.example.samplecredentialwallet.utils.AuthCodeHolder
import kotlinx.coroutines.launch
class MainActivity : ComponentActivity() {

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.navigation
package com.example.samplecredentialwallet.navigation
import android.net.Uri
import android.util.Log
@@ -7,14 +7,14 @@ import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.navArgument
import com.example.sampleappvciclient.ui.credential.CredentialDownloadScreen
import com.example.sampleappvciclient.ui.credential.CredentialListScreen
import com.example.sampleappvciclient.ui.home.HomeScreen
import com.example.sampleappvciclient.ui.issuer.IssuerListScreen
import com.example.sampleappvciclient.ui.issuer.IssuerDetailScreen
import com.example.sampleappvciclient.ui.auth.AuthWebViewScreen
import com.example.sampleappvciclient.ui.splash.SplashScreen
import com.example.sampleappvciclient.utils.Constants
import com.example.samplecredentialwallet.ui.credential.CredentialDownloadScreen
import com.example.samplecredentialwallet.ui.credential.CredentialListScreen
import com.example.samplecredentialwallet.ui.home.HomeScreen
import com.example.samplecredentialwallet.ui.issuer.IssuerListScreen
import com.example.samplecredentialwallet.ui.issuer.IssuerDetailScreen
import com.example.samplecredentialwallet.ui.auth.AuthWebViewScreen
import com.example.samplecredentialwallet.ui.splash.SplashScreen
import com.example.samplecredentialwallet.utils.Constants
sealed class Screen(val route: String) {
object Splash : Screen("splash")

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.auth
package com.example.samplecredentialwallet.ui.auth
import android.annotation.SuppressLint
import android.graphics.Bitmap
@@ -17,8 +17,8 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.viewinterop.AndroidView
import androidx.navigation.NavController
import com.example.sampleappvciclient.navigation.Screen
import com.example.sampleappvciclient.utils.AuthCodeHolder
import com.example.samplecredentialwallet.navigation.Screen
import com.example.samplecredentialwallet.utils.AuthCodeHolder
@SuppressLint("SetJavaScriptEnabled")
@Composable

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.credential
package com.example.samplecredentialwallet.ui.credential
import android.util.Log
import androidx.compose.foundation.background
@@ -17,12 +17,12 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import com.example.sampleappvciclient.navigation.Screen
import com.example.sampleappvciclient.utils.AuthCodeHolder
import com.example.sampleappvciclient.utils.Constants
import com.example.sampleappvciclient.utils.CredentialStore
import com.example.sampleappvciclient.utils.CredentialVerifier
import com.example.sampleappvciclient.utils.SecureKeystoreManager
import com.example.samplecredentialwallet.navigation.Screen
import com.example.samplecredentialwallet.utils.AuthCodeHolder
import com.example.samplecredentialwallet.utils.Constants
import com.example.samplecredentialwallet.utils.CredentialStore
import com.example.samplecredentialwallet.utils.CredentialVerifier
import com.example.samplecredentialwallet.utils.SecureKeystoreManager
import com.nimbusds.jose.JOSEObjectType
import com.nimbusds.jose.JWSAlgorithm
import com.nimbusds.jose.JWSHeader
@@ -121,7 +121,7 @@ fun CredentialDownloadScreen(
loadingMessage.value = "Starting credential download..."
}
withTimeout(30000L) {
withTimeout(600000L) {
val credential = client.requestCredentialFromTrustedIssuer(
credentialIssuer = Constants.credentialIssuerHost.toString(),
@@ -324,7 +324,7 @@ fun CredentialDownloadScreen(
modifier = Modifier.fillMaxWidth(),
enabled = !isLoading.value,
colors = ButtonDefaults.buttonColors(
containerColor = com.example.sampleappvciclient.ui.theme.InjiOrange
containerColor = com.example.samplecredentialwallet.ui.theme.InjiOrange
)
) {
if (isLoading.value) {
@@ -360,7 +360,7 @@ fun CredentialDownloadScreen(
) {
CircularProgressIndicator(
modifier = Modifier.size(48.dp),
color = com.example.sampleappvciclient.ui.theme.InjiOrange
color = com.example.samplecredentialwallet.ui.theme.InjiOrange
)
Spacer(modifier = Modifier.height(16.dp))
Text(
@@ -444,7 +444,7 @@ fun CredentialDownloadScreen(
},
modifier = Modifier.fillMaxWidth(),
colors = ButtonDefaults.buttonColors(
containerColor = com.example.sampleappvciclient.ui.theme.InjiOrange
containerColor = com.example.samplecredentialwallet.ui.theme.InjiOrange
)
) {
Text("Try again", fontSize = 16.sp)

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.credential
package com.example.samplecredentialwallet.ui.credential
import android.graphics.BitmapFactory
import android.util.Base64
@@ -22,7 +22,7 @@ import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import androidx.navigation.NavController
import com.example.sampleappvciclient.utils.CredentialStore
import com.example.samplecredentialwallet.utils.CredentialStore
import org.json.JSONArray
import org.json.JSONObject
@@ -139,7 +139,7 @@ fun CredentialCard(
modifier = Modifier
.fillMaxWidth(),
colors = CardDefaults.cardColors(
containerColor = com.example.sampleappvciclient.ui.theme.CardBlue
containerColor = com.example.samplecredentialwallet.ui.theme.CardBlue
),
elevation = CardDefaults.cardElevation(defaultElevation = 4.dp)
) {
@@ -233,7 +233,7 @@ fun CredentialCard(
onClick = { /* Handle activation */ },
modifier = Modifier.fillMaxWidth(),
colors = ButtonDefaults.buttonColors(
containerColor = com.example.sampleappvciclient.ui.theme.InjiOrange
containerColor = com.example.samplecredentialwallet.ui.theme.InjiOrange
)
) {
Text("Activate", fontSize = 16.sp)
@@ -248,7 +248,7 @@ fun CredentialCard(
onClick = { showRaw = !showRaw },
modifier = Modifier.fillMaxWidth(),
colors = ButtonDefaults.outlinedButtonColors(
contentColor = com.example.sampleappvciclient.ui.theme.InjiPurple
contentColor = com.example.samplecredentialwallet.ui.theme.InjiPurple
)
) {
Icon(

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.home
package com.example.samplecredentialwallet.ui.home
import android.graphics.BitmapFactory
import android.util.Base64
@@ -27,10 +27,10 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.sampleappvciclient.R
import com.example.sampleappvciclient.ui.theme.CardBlue
import com.example.sampleappvciclient.ui.theme.InjiOrange
import com.example.sampleappvciclient.utils.CredentialStore
import com.example.samplecredentialwallet.R
import com.example.samplecredentialwallet.ui.theme.CardBlue
import com.example.samplecredentialwallet.ui.theme.InjiOrange
import com.example.samplecredentialwallet.utils.CredentialStore
import org.json.JSONArray
import org.json.JSONObject

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.issuer
package com.example.samplecredentialwallet.ui.issuer
import androidx.compose.foundation.layout.*
import androidx.compose.material3.*
@@ -7,7 +7,7 @@ import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.unit.dp
import androidx.lifecycle.viewmodel.compose.viewModel
import com.example.sampleappvciclient.viewmodel.CredentialViewModel
import com.example.samplecredentialwallet.viewmodel.CredentialViewModel
@Composable
fun IssuerDetailScreen(

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.issuer
package com.example.samplecredentialwallet.ui.issuer
import androidx.compose.foundation.BorderStroke
import androidx.compose.foundation.Image
@@ -22,7 +22,7 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import com.example.sampleappvciclient.R
import com.example.samplecredentialwallet.R
data class Issuer(
val id: String,

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.splash
package com.example.samplecredentialwallet.ui.splash
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.*

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.theme
package com.example.samplecredentialwallet.ui.theme
import androidx.compose.ui.graphics.Color

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.theme
package com.example.samplecredentialwallet.ui.theme
import android.app.Activity
import android.os.Build
@@ -43,7 +43,7 @@ private val LightColorScheme = lightColorScheme(
)
@Composable
fun SampleAppVCIClientTheme(
fun SampleCredentialWalletTheme(
darkTheme: Boolean = isSystemInDarkTheme(),
dynamicColor: Boolean = false,
content: @Composable () -> Unit

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.ui.theme
package com.example.samplecredentialwallet.ui.theme
import androidx.compose.material3.Typography
import androidx.compose.ui.text.TextStyle

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.utils
package com.example.samplecredentialwallet.utils
import android.util.Log
import kotlinx.coroutines.CompletableDeferred

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.utils
package com.example.samplecredentialwallet.utils
object Constants {
var credentialIssuerHost: String? = null

View File

@@ -1,7 +1,10 @@
package com.example.sampleappvciclient.utils
package com.example.samplecredentialwallet.utils
import androidx.compose.runtime.mutableStateListOf
import androidx.compose.runtime.snapshots.SnapshotStateList
object CredentialStore {
private val credentials = mutableListOf<String>()
val credentials: SnapshotStateList<String> = mutableStateListOf()
fun addCredential(credentialJson: String) {
credentials.add(credentialJson)

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.utils
package com.example.samplecredentialwallet.utils
import android.util.Log
import io.mosip.vercred.vcverifier.CredentialsVerifier

View File

@@ -1,4 +1,4 @@
package com.example.sampleappvciclient.utils
package com.example.samplecredentialwallet.utils
import io.mosip.pixelpass.PixelPass

View File

@@ -1,7 +1,7 @@
package com.example.sampleappvciclient.viewmodel
package com.example.samplecredentialwallet.viewmodel
import androidx.lifecycle.ViewModel
import com.example.sampleappvciclient.utils.Constants
import com.example.samplecredentialwallet.utils.Constants
class CredentialViewModel : ViewModel() {

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.SampleCredentialWallet" parent="android:Theme.Material.Light.NoActionBar" />
</resources>

View File

@@ -23,5 +23,5 @@ dependencyResolutionManagement {
}
rootProject.name = "SampleAppVCIClient"
rootProject.name = "SampleCredentialWallet"
include(":app")