This repo refers to a React Native mobile app used for a project for the Context Aware System class at the University of Bologna.
You need:
- Node
v21.7.1
. We strongly suggestfnm
ornvm
for Node versions management. - PnpM or NPM (better the first one).
After that you need to edit the .env
file and set up:
-
EXPO_PUBLIC_API_URL
: refers to the backend URL. -
EXPO_PUBLIC_ALERTD_URL
: refers to the alertd URL.
And start the Expo app.
pnpm run start
This work is made by Expo but you need an extra setup if you want that everything go up well.
First of all you log in
eas login
Now you set up Push Notifications.
- Generate a release key
keytool -genkey -v -storetype JKS -keyalg RSA -keysize 2048 -validity 10000 -storepass KEYSTORE_PASSWORD -keypass KEY_PASSWORD -alias cas4 -keystore release.keystore -dname "CN=John Doe, OU=Unknown, O=Unknown, L=Bologna, ST=Italy, C=IT"
- Build Android app
eas build --platform android
-
Download the artifact from Expo page
-
Create APKS from the AAB file
java -jar bundletool-all-1.17.1.jar build-apks --bundle=application-XXXX.aab --output=cas.apks --mode=universal --ks android/keystores/release.keystore --ks-key-alias=cas4