Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

Deploying OpenSchema Android Demo

Eduardo Chiang edited this page Sep 16, 2021 · 1 revision

Public Repository

The repository can be cloned to work locally using git with the following command:

git clone https://github.com/magma/openschema.git

Setting up required resources

OpenSchema Backend

You will need to get values used when deploying your OpenSchema Backend:

  1. Get the .crt (server.crt) file you used to deploy OpenSchema Backend and put it inside app/src/main/res/raw/.

  2. Create a file named keys.xml inside app/src/main/res/values/ and fill it with the following contents:

<?xml version="1.0" encoding="utf-8"?>
<resources>
  <string name="backend_base_url">YOUR_BACKEND_URL</string>
  <string name="backend_username">YOUR_BACKEND_USERNAME</string>
  <string name="backend_password">YOUR_BACKEND_PASSWORD</string>
  <string name="google_maps_key">YOUR_GOOGLE_MAPS_KEY</string>
</resources>

Crashlytics

The demo app uses Firebase Crashlytics to debug crashes. You will need a google-services.json file. This file can be downloaded from the Firebase console after configuring your own project. You might need to change your demo app's package name.

Alternatively, you can disable Crashlytics by removing the following lines at the top of the app's build.gradle

apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

Building the OpenSchema Android demo

You can generate an APK using Android Studio.