cashless2ecash

cashless2ecash: pay with cards for digital cash (experimental)
Log | Files | Refs | README

commit 60a4b12fbcd7782eaac9e97001272aa46889f4ea
parent ceb25dae4ba68ec9e5de8c588b6c575bba24b850
Author: fsb2 <benjamin.fehrensen@bfh.ch>
Date:   Wed,  9 Apr 2025 10:49:08 +0200

App set to Kiosk Mode

Diffstat:
Mwallee-c2ec/app/build.gradle.kts | 4++--
Mwallee-c2ec/app/release/app-release.apk | 0
Mwallee-c2ec/app/release/baselineProfiles/0/app-release.dm | 0
Mwallee-c2ec/app/release/baselineProfiles/1/app-release.dm | 0
Mwallee-c2ec/app/release/output-metadata.json | 4++--
Mwallee-c2ec/app/src/main/AndroidManifest.xml | 3++-
Mwallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/withdrawal/AuthorizePaymentScreen.kt | 6+++---
Mwallee-c2ec/app/src/main/res/values/strings.xml | 1+
8 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/wallee-c2ec/app/build.gradle.kts b/wallee-c2ec/app/build.gradle.kts @@ -11,8 +11,8 @@ android { applicationId = "ch.bfh.habej2.wallee_c2ec" minSdk = 27 targetSdk = 34 - versionCode = 1 - versionName = "1.0" + versionCode = 2 + versionName = "1.0.1" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" vectorDrawables { diff --git a/wallee-c2ec/app/release/app-release.apk b/wallee-c2ec/app/release/app-release.apk Binary files differ. diff --git a/wallee-c2ec/app/release/baselineProfiles/0/app-release.dm b/wallee-c2ec/app/release/baselineProfiles/0/app-release.dm Binary files differ. diff --git a/wallee-c2ec/app/release/baselineProfiles/1/app-release.dm b/wallee-c2ec/app/release/baselineProfiles/1/app-release.dm Binary files differ. diff --git a/wallee-c2ec/app/release/output-metadata.json b/wallee-c2ec/app/release/output-metadata.json @@ -11,8 +11,8 @@ "type": "SINGLE", "filters": [], "attributes": [], - "versionCode": 1, - "versionName": "1.0", + "versionCode": 2, + "versionName": "1.0.1", "outputFile": "app-release.apk" } ], diff --git a/wallee-c2ec/app/src/main/AndroidManifest.xml b/wallee-c2ec/app/src/main/AndroidManifest.xml @@ -23,7 +23,8 @@ android:theme="@style/Theme.Walleec2ec"> <intent-filter> <action android:name="android.intent.action.MAIN" /> - + <action android:name="com.wallee.android.TILL_APPLICATION" /> + <category android:name="android.intent.category.DEFAULT" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> diff --git a/wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/withdrawal/AuthorizePaymentScreen.kt b/wallee-c2ec/app/src/main/java/ch/bfh/habej2/wallee_c2ec/withdrawal/AuthorizePaymentScreen.kt @@ -31,6 +31,7 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalConfiguration import androidx.compose.ui.unit.dp +import ch.bfh.habej2.wallee_c2ec.R import com.wallee.android.till.sdk.ApiClient import com.wallee.android.till.sdk.data.LineItem import com.wallee.android.till.sdk.data.Transaction @@ -57,13 +58,14 @@ fun AuthorizePaymentScreen(model: WithdrawalViewModel, activity: Activity, clien .setCurrency(Currency.getInstance(uiState.currency)) .setInvoiceReference(uiState.encodedWopid) .setMerchantReference(uiState.encodedWopid) + .setCustomText(activity.getString(R.string.wallee_custom_text)) .setTransactionProcessingBehavior(TransactionProcessingBehavior.COMPLETE_IMMEDIATELY) .build() try { println("Authorizing transaction ...") model.setAuthorizing() - client.authorizeTransaction(transaction) // STOPPED + client.authorizeTransaction(transaction) } catch (e: Exception) { println("FAILED authorizing transaction ${e.message}") model.withdrawalOperationFailed(activity) @@ -83,8 +85,6 @@ fun AuthorizePaymentScreen(model: WithdrawalViewModel, activity: Activity, clien WithdrawalState.READY_FOR_AUTHORIZATION -> WalleeProcessingTransaction() WithdrawalState.AUTHORIZATION_TRIGGERED -> WalleeProcessingTransaction() WithdrawalState.AUTHORIZATION_FAILED -> model.withdrawalOperationFailed(activity) - // TODO : Coordination of Wallee SDK components and this app must be looked at - // -> Input Ben: Broadcast Messages abfangen (welche Broadcast sendet die SDK?) WithdrawalState.AUTHORIZED -> WalleeCompletingPayment(client, model) // TODO: Maybe following is not needed because completion immediately is specified: "WalleeCompletingPayment(client, model)" WithdrawalState.COMPLETION_TRIGGERED -> WalleeProcessingTransaction() WithdrawalState.COMPLETED -> model.talerCheckWalleeRequest(activity) diff --git a/wallee-c2ec/app/src/main/res/values/strings.xml b/wallee-c2ec/app/src/main/res/values/strings.xml @@ -8,4 +8,5 @@ <string name="no_complete_reply">No valid transaction completion reply.</string> <string name="not_compatible">SDK is not compatible.</string> <string name="no_authorization">No authorization received.</string> + <string name="wallee_custom_text">Buy Taler for your Wallet</string> </resources> \ No newline at end of file