Contacts module for the Eitri Android framework. This module integrates seamlessly with the Eitri runtime.
- Android 5.0 (API level 21) or later
READ_CONTACTSand/orWRITE_CONTACTSdeclared by the host app (see below)
The module does not declare the contacts permissions itself, so that linking it never grants contacts
access to a host app that does not use the feature. Declare in the host app's AndroidManifest.xml
only the access the app actually needs:
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Reading contacts: streamAllContacts -->
<uses-permission android:name="android.permission.READ_CONTACTS" />
<!-- Writing contacts: createContact, deleteContact -->
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
</manifest>The eitri-android-contacts artifact is available on Maven Central.
dependencies {
implementation("tech.eitri:eitri-android-contacts:$version")
}Make sure to replace $version or ${version} with the desired version of the module. You can find the latest version on Maven Central.
import tech.eitri.android.contacts.ContactsModule
// [...]
val machineContext = EitriMachineInstanceManager.start()
val mainEitriMachine = machineContext.mainMachine
// configure eitri-machine [...]
// register modules
mainEitriMachine.modules.register(ContactsModule())ContactsModule: The entry point for the module, implementing theEitriModuleprotocol. It registers the available contacts methods with the Eitri runtime.
The module exposes its functionality under the contacts namespace.
Examples of what methods are avaliable and how they can be used can be consulted on the Eitri Bifrost documentation page