Installation and Setup


Mobile Artemis

Installation of Mobile Artemis consists of the following parts:

  1. IDE and Flutter installation
  2. Pulling the Mobile Artemis and Artemis web source code
  3. (Optional) Create a Firebase Project and link the app with it
  4. (Optional) Add credentials to receive fallback SMS using prosms.gr (or another SMS provider)
  5. Building the app bundle/apk and iOS App Store Package for Android and iOS devices respectively
The versions the mobile app could be build are:
  • Android versions: 5.0 and newer
  • iOS versions: 9.0 and newer
The above minimum versions that the app could be built for, are subject to change due to the new versions of the application's plugins and packages and the Flutter framework itself.
Flutter and IDE installation
  • Install flutter
    1. To download and install flutter follow the official installation guide https://docs.flutter.dev/get-started/install
    2. To make sure that you have set up everything correctly run: flutter doctor
    In case you have already installed Flutter make sure you have the latest version by running the following command flutter -–version To get the latest version run: flutter upgrade
  • Install IDE
    1. Download and install Android Studio from the official website here
    2. To download and install Visual Studio Code follow the official guide here
    After installing Android Studio or Visual Studio Code you will need the flutter plugin for your IDE. Install it for your IDE following the guide here

Pulling the Mobile Artemis and Artemis Web source code
  1. Clone the repository using the following command git clone git@github.com:FORTH-ICS-INSPIRE/artemis_mobile.git
  2. Install the required dependencies included in pubspec.yaml by running from the project root folder flutter pub get
  3. Add the url of Artemis in apiUrl inside /lib/services/api_service.dart
  4. (Optional) In case you will be using the push notifications and the fallback sms you will also need to clone Artemis Web by running git clone https://github.com/FORTH-ICS-INSPIRE/artemis-web.git

(Optional) Create Firebase project and link to Mobile Artemis
  1. Create and setup a firebase project from firebase here
  2. If you haven't already install the Firebase CLI following the official firebase CLI installation guide
  3. Log into Firebase using your Google account by running firebase login
  4. Install the FlutterFire CLI by running the following command dart pub global activate flutterfire_cli
  5. To use the FlutterFire CLI to connect Mobile Artemis application to your Firebase project run from your projects root folder flutterfire configure
  6. In lib/services/push_notification_service.dart import the generated firebase_options.dart file by adding import 'firebase_options.dart';
  7. Also in lib/services/push_notification_service.dart add the options of initialization to use the exported DefaultFirebaseOptions class existing in firebase_options.dart file. The firebase initialize app should look like: options: DefaultFirebaseOptions.currentPlatform,
  8. Next, you will need to generate a private key for your service account by following the guide here. The key will be in the form of a json file.
  9. Open the Artemis Web project and add the file path inside the .env file in SERVICE_ACCOUNT_PATH
  10. To be able to receive push notifications on an iOS device you will need to do some extra steps as described here

(Optional) Add credentials to receive fallback SMS using prosms.gr (or another SMS provider)

To be able to receive SMS messages you will need to setup a provider. Inside apps/artemis-notification/src/main.ts there is a reference implementation using prosms.gr. Keep in mind that SMS messages will be sent only to users that did not receive the push notification.
* If you choose to use another provider you will need to modify the sendSMS function in the same file according to your SMS provider's specifications.
* In case you choose prosms all you need to do is set the SMS_USERNAME, SMS_PASSWORD and SMS_ORIGINATOR inside the .env file.


Building the app bundle/apk and iOS App Store Package for Android and iOS devices
  • To create an apk executable for Android devices execute from the root folder flutter build apk
  • To create an app bundle executable for Android devices execute from the root folder flutter build appbundle
  • To create an app bundle executable for iOS devices execute from the root folder flutter build ipa

    Note: To be able to create an ipa executable a Mac device is needed


^