Getting Started
The intent library communicates with the NIMMSTA Android App by using Android intents.
Requirements
- NIMMSTA Android App Version 6.0 or above
- If you use NIMMSTA App 7.0.5 or older: Make sure NIMMSTA App is installed before your app, otherwise the permissions are not set correctly.
Maven Repository
Next add the NIMMSTA Maven Repository to the settings.
Integrate Intent Library
To get started with the NIMMSTA Intent Library, you have to add the library as a dependency to your Android Project and have access to the NIMMSTA Maven Repo.
Initialize library
To initialize the communication between your app and the NIMMSTA App you have to bind to NIMMSTAIntentConnection.
// optional: adapt Package name when using your own package name:
NIMMSTAService.serviceName = ComponentName("com.nimmsta.custom", "com.nimmsta.core.android.intents.NIMMSTAIntentService")
NIMMSTAIntentConnection.Companion.bindServiceToActivity(this).onComplete((task) -> {
NIMMSTAIntentConnection connection = task.getResult();
NIMMSTAManager manager = connection.getManager();
return null;
});
Remember to cancel all connection attempts and to close the connection to the NIMMSTA App. You can do this in the onDestroy method of an activity for example
To learn more about what you can do with the NimmstaManager or the NimmstaDevice head to the dedicated pages for them.