Android native app integration
Integrating Appfigurate Library into Android native apps
Last updated
Integrating Appfigurate Library into Android native apps
Last updated
Android native apps can be developed in both Kotlin and Java.
For Mobile Flutter apps, jump to . For React Native apps, jump to .
You must have the following:
Android Studio or IntelliJ.
Android SDKs and associated Emulators.
AppfigurateSE macOS or Windows app.
Appfigurate Emulator app installed into one or more Android Emulators (use the for easy 1 click installation).
Your app must have a minimum API level 26 (Android 8.0 Oreo) in order to link Appfigurate Library.
In your app's build.gradle
add the following to the dependency
section:
Run Appfigurate in the Android Emulator.
Tap ≡
Add app
.
Select app type Android
.
Enter a URL scheme that will be used by Appfigurate to launch your app in order to read or apply configuration. The URL scheme must be 4-64 ASCII characters in length and must be unique to your app. e.g. YOUR-APP-URLSCHEME
Tap Add app
.
In Appfigurate Emulator app, under the KOTLIN/ANDROID LIBRARY INTEGRATION
or JAVA/ANDROID LIBRARY INTEGRATION
section:
Tap Output implementation
then tap Console
.
The output will be displayed in Android Studio, under the Logcat tab. Filter the output to application nz.co.electricbolt.appfigurate
In your app, add a Kotlin class called Configuration.kt
Kotlin Configuration example
AndroidManifest.xml
example
To test that you've successfully updated your app to use Appfigurate:
Compile and run your app to the Emulator instance.
Launch the Appfigurate Emulator app.
Tap your applications row. The app's configuration will be read in the background.
Paste the Kotlin implementation file output to the Console in the section above.
Note: your public key output to the Console in the section above will be different to the public key in the following example.
Paste the Java implementation file output to the Console in the section above.
Note: your public key output to the Console in the section above will be different to the public key in the following example.
In your apps AndroidManifest.xml
file include the following meta-data
and provider
sections inside your application
section. Replace the text YOUR-APP-URLSCHEME
with your own app's URL Scheme - the same value you added in the section above.
Appfigurate's screen will now be displayed. You can now change the debugLogging
and serverURL
properties. Tap Apply⌄
to apply the configuration to your watchOS app.
Now jump to .