Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Mobile apps need to be re-compiled with the correct server’s IP address for it to be functional.

To do so:

  • Open Android Studio

  • Open the mobile app project you want to configure (available on openIMIS github)

  • Find the gradle file /app/build.gradle

  • update the "API_BASE_URL" and the "applicationId" , for the default, and other product flavor that you see fit


    Code Block
    languagejava
    productFlavors.all {
            buildConfigField "String", "API_BASE_URL", '"http://demo.openimis.org/rest/"'
            buildConfigField "boolean", "SHOW_CONTROL_NUMBER_MENU", 'false'
            buildConfigField "String", "RAR_PASSWORD", '")(#$1HsD"'
            resValue "string", "app_name", "openIMIS Policies"
        }
        productFlavors {
            demoProd {
                applicationId "org.openimis.imispolicies.demoProd"
                buildConfigField "String", "API_BASE_URL", '"http://demo.openimis.org/rest/"'
                buildConfigField "String", "RAR_PASSWORD", '")(#$1HsD"'
                resValue "string", "app_name", "Policies Demo"
                dimension = 'std'
            }
            demoRelease {
                applicationId "org.openimis.imispolicies.demoRelease"
                buildConfigField "String", "API_BASE_URL", '"http://release.openimis.org/rest/"'
                buildConfigField "boolean", "SHOW_CONTROL_NUMBER_MENU", 'true'
                resValue "string", "app_name", "Policies Release"
                dimension = 'std'
            }
        }


    Build the app via the tools menu

  • The new .apk file is now available in the release folder indicated by Android Studio






Previous step | Go to parent Table of content | Next step