2.3 KiB
2.3 KiB
Testing OnTime Apps
Backend API (test endpoint)
Base URL: https://apitest.semestaterpadu.my.id/
- Health check:
GET https://apitest.semestaterpadu.my.id/api/notification
Expected:{"message":"Notification API ready"} - FCM send:
POST https://apitest.semestaterpadu.my.id/api/notification/send_generic
Body:{"target":"<fcm_token>","is_topic":false,"data":{...}}
Backend notification API is reachable at the test endpoint.
Android apps (User & Driver)
Prerequisites
- JDK 17+ (project uses Gradle 8.x / AGP 8.5)
- Android SDK (API 33; build-tools, platform-tools)
- Android device or emulator (for install/run)
- Optional: Android Studio (simplest: open project → Run)
Build from command line
# User app
cd OnTime_User_live
./gradlew assembleDebug
# Driver app
cd OnTime_Driver_live
./gradlew assembleDebug
Debug APK output:
- User:
OnTime_User_live/app/build/outputs/apk/debug/app-debug.apk - Driver:
OnTime_Driver_live/app/build/outputs/apk/debug/app-debug.apk
Install and run on device/emulator
# Ensure one device/emulator is connected: adb devices
# User app
cd OnTime_User_live && ./gradlew installDebug
# Driver app
cd OnTime_Driver_live && ./gradlew installDebug
Or in Android Studio: open OnTime_User_live or OnTime_Driver_live → Run (▶).
User app signing (debug)
User app uses a debug keystore: OnTime_User_live/app/ontimekeystore.jks.
If the file is missing, either add it or in app/build.gradle point storeFile to your own debug keystore (or use the default debug keystore by removing/commenting the signingConfigs block for debug).
Quick flow to test ordering
- Backend: Confirm
https://apitest.semestaterpadu.my.id/api/notificationreturnsNotification API ready. - User app: Login → choose fitur → set jemput & tujuan → set payment → Order. App will call backend and send FCM to drivers.
- Driver app: Login (driver account). When an order is sent, FCM opens NewOrderActivity → Accept (or auto-accept). User app should switch to ProgressActivity.
- Driver: In OrderFragment tap Start, then Finish (sampai tujuan). User app ProgressActivity should show “driver start” then “finish/tiba di tujuan”.
Use the same backend (apitest.semestaterpadu.my.id) for both apps so FCM and API stay consistent.