Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add new remote services in the server app to enhance keyple-less clients capabilities #25

Merged
merged 9 commits into from
Oct 22, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ jobs:
steps:
- name: Check out repository code from ${{ github.repository }}/${{ github.ref }}
uses: actions/checkout@v4
- name: Set up JDK 11
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'temurin'
- name: Set up Node JS
uses: actions/setup-node@v4
with:
Expand All @@ -29,7 +29,7 @@ jobs:
dotnet-version: 6.0.x
- name: Update permissions
working-directory: .
run: chmod +x ./client/android/gradlew ./server/gradlew ./.github/scripts/*.sh
run: chmod +x ./client/android/gradlew ./client/android-light/gradlew ./server/gradlew ./.github/scripts/*.sh
- name: Check version client Android
working-directory: ./client/android/
run: ../../.github/scripts/check_version.sh
Expand All @@ -45,11 +45,14 @@ jobs:
dotnet test --no-build --verbosity normal
- name: Build and Test client Android
working-directory: ./client/android/
run: ./gradlew build test --info --stacktrace
run: ./gradlew clean build test --info --stacktrace
- name: Build and Test client Android Light
working-directory: ./client/android-light/
run: ./gradlew clean build test --info --stacktrace
- name: Build and Test server
working-directory: ./server/
run: |
cd ./dashboard-app
npm install
cd ..
./gradlew build test --info --stacktrace
./gradlew clean build test --info --stacktrace
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]
### Added
- Added a new Android client application to demonstrate the use of the **Keyple Distributed JSON API** and without the
need of the `keyple-card-calypso-java-lib` on terminal side. The corresponding code is located in the folder named
`android-light`.
- Added new remote services in the server app to enhance keyple-less clients capabilities.
### Changed
- Rename repository from `keyple-java-demo-remote` to `keyple-demo-ticketing-reloading-remote`
- Rename Android artifact from `keyple-demo-remote-client-android` to `keyple-demo-ticketing-reloading-client-android-app`
Expand Down
92 changes: 92 additions & 0 deletions client/android-light/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# Built application files
*.apk
#*.aar For ".aar" files in "libs" directory
*.ap_
*.aab

# Files for the ART/Dalvik VM
*.dex

# Java class files
*.class

# Generated files
bin/
gen/
out/
# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

# Gradle files
.gradle/
build/

# Local configuration file (sdk path, etc)
local.properties

# Proguard folder generated by Eclipse
proguard/

# Log Files
*.log

# Android Studio Navigation editor temp files
.navigation/

# Android Studio captures folder
captures/

# IntelliJ
*.iml
/.idea
.idea/workspace.xml
.idea/tasks.xml
.idea/gradle.xml
.idea/assetWizardSettings.xml
.idea/dictionaries
.idea/libraries
# Android Studio 3 in .gitignore file.
.idea/caches
.idea/modules.xml
# Comment next line if keeping position of elements in Navigation Editor is relevant for you
.idea/navEditor.xml

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
#*.jks
#*.keystore

# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
.cxx/

# Google Services (e.g. APIs or Firebase)
# google-services.json

# Freeline
freeline.py
freeline/
freeline_project_description.json

# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md

# Version control
vcs.xml

# lint
lint/intermediates/
lint/generated/
lint/outputs/
lint/tmp/
# lint/reports/

# Android Profiling
*.hprof

/LICENSE_HEADER
/signing.properties
46 changes: 46 additions & 0 deletions client/android-light/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Keyple Reload Demo - Android Client's repository

This is the repository for the Android Client of the Keyple Reload Demo application.

This demo is an open source project provided by the [Calypso Networks Association](https://calypsonet.org) implementing
the [Eclipse Keyple SDK](https://keyple.org) in a typical use case that can serve as a basis for building a ticketing
ecosystem based on contactless cards and/or NFC smartphones.

The source code and APK are available at [calypsonet/keyple-demo-ticketing-reloading-remote/releases](https://github.com/calypsonet/keyple-demo-ticketing-reloading-remote/releases)

The code can be easily adapted to other cards, terminals and business logic.

It shows how to load contracts into a Calypso card, the whole ticketing process being managed remotely.
Following the contract loading the card can pay presented to a validator running the
[Keyple Demo Validation](https://github.com/calypsonet/keyple-demo-ticketing-validation-app) application and then checked with
the [Keyple Demo Control](https://github.com/calypsonet/keyple-demo-ticketing-control-app) application.

Read the main [README](https://github.com/calypsonet/keyple-demo-ticketing-reloading-remote#readme) to understand the purpose of this
application.

## Screens

- Main screen (`MainActivity`): Setup Screen.
- Home (`HomeActivity`): Display a menu allowing to choose the Calypso card type to read and load.
- 'Contactless support': works with the native Android NFC reader and is available for any android smartphone.
- 'SIM Card': works with the native Android OMAPI reader and is available for any android smartphone. (Work in progress)
- 'Embedded Secure Element': works with the Wizway plugin to access to eSE. (Work in progress)
- Settings (`SettingsMenuActivity`):
- Server (ServerSettingsActivity): Settings for server connexion.
- Configuration (ConfigurationSettingsActivity): Activate/Deactivate each plugin availability in the android smartphone.
- Personalization (PersonalizationActivity): Reset a card (clean contracts).
- Card Reader (`CardReaderActivity`): Launches the flavour associated Keyple plugin. It will try to read Card using selected card reader.
- Initialize Keyple plugin regarding selected Calypso card type.
- Connect to remote server.
- With remote server connected to a Calypso SAM, proceed to a secured reading of card content.
- Card Summary (`CardSummaryActivity`): displays the card content.
- Card content can be season pass and/or multi-trip ticket.
- Select Tickets (`SelectTicketsActivity`): The remote server will returns a list of available products (Season Pass and Multi-trip ticket) to buy for this card. This list presented in this view.
- Checkout (`CheckoutActivity`): Simulates a payment done with a credit card.
- Payment Validated (`PayementValidatedActivity`): Simulates the payment validation.
- Charge (`ChargeActivity`): Presents the process of loading the product selected.
- Block loading if card has been swapped.
- Initialize Keyple plugin regarding selected Calypso card type.
- Connect to remote server.
- With remote server connected to a SAM, proceed to a card writing.
- Charge Result (`ChargeResultActivity`): Displays if loading was successful or failed.
Loading