Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 

Repository files navigation

eitri-android-contacts

Contacts module for the Eitri Android framework. This module integrates seamlessly with the Eitri runtime.

Requirements

  • Android 5.0 (API level 21) or later
  • READ_CONTACTS and/or WRITE_CONTACTS declared by the host app (see below)

Declaring the permissions

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>

Installation

The eitri-android-contacts artifact is available on Maven Central.

Gradle Kotlin DSL (build.gradle.kts)

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.

Registering contacts module

    import tech.eitri.android.contacts.ContactsModule
    
    // [...]

    val machineContext = EitriMachineInstanceManager.start()
    val mainEitriMachine = machineContext.mainMachine

    // configure eitri-machine [...]

    // register modules
    mainEitriMachine.modules.register(ContactsModule())

Core Concepts

  • ContactsModule: The entry point for the module, implementing the EitriModule protocol. It registers the available contacts methods with the Eitri runtime.

Methods

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

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors