Skip to content

peterplamenovpenchev/appcues-android-sdk

 
 

Repository files navigation

Appcues Android SDK

maven CircleCI License: MIT

NOTE: This is a pre-release project for testing as a part of our mobile beta program. If you are interested in learning more about our mobile product and testing it before it is officially released, please visit our site and request early access.

If you have been contacted to be a part of our mobile beta program, we encourage you to try out this library and provide feedback via Github issues and pull requests. Please note this library will not operate if you are not part of the mobile beta program.

Appcues Android SDK allows you to integrate Appcues experiences into your native Android apps.

The SDK is a Kotlin library for sending user properties and events to the Appcues API and retrieving and rendering Appcues content based on those properties and events.

🚀 Getting Started

Installation

Add the Appcues Android SDK dependency to your application. There are options for a standard installation, or for usage through a Segment plugin.

Standard Installation

The library is distributed through Maven Central. Add the appcues module to your build.gradle as a dependency as shown in the code sample below, and replace the <latest_version> with the latest release version listed in this repository.

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.appcues:appcues:<latest_version>'
}

Segment

Appcues supports integration with Segment's analytics-kotlin library. To install with Segment, you'll use the Segment Appcues plugin.

One Time Setup

After installing the package, you can reference Appcues Android SDK by importing the package with import com.appcues.*.

Initializing the SDK

An instance of the Appcues Android SDK should be initialized when your app launches. A lifecycle method such as the Application onCreate would be a common location:

override fun onCreate() {
    super.onCreate()
    appcues = Appcues(this, APPCUES_ACCOUNT_ID, APPCUES_APPLICATION_ID)
}

Initializing the SDK requires you to provide two values: APPCUES_ACCOUNT_ID and APPCUES_APPLICATION_ID. These values can be obtained from your Appcues settings.

Supporting Debugging and Experience Previewing

Supporting debugging and experience previewing is not required for the Appcues Android SDK to function, but it is necessary for the optimal Appcues builder experience. Refer to the Debug Guide for details.

Identifying Users

In order to target content to the right users at the right time, you need to identify users and send Appcues data about them. A user is identified with a unique ID.

  • identify(userId)

Tracking Screens and Events

Events are the “actions” your users take in your application, which can be anything from clicking a certain button to viewing a specific screen. Once you’ve installed and initialized the Appcues Android SDK, you can start tracking screens and events using the following methods:

  • track(name)
  • screen(title)

Refer to the full Getting Started Guide for more details.

🛠 Customization

Refer to the Extending Guide for details.

📝 Documentation

Full documentation is available at https://docs.appcues.com/

🎬 Samples

The samples directory in repository contains a full example Kotlin Android app providing references for usage of the Appcues API.

👷 Contributing

See the contributing guide to learn how to get set up for development and how to contribute to the project.

📄 License

This project is licensed under the MIT License. See LICENSE for more information.

Packages

No packages published

Languages

  • Kotlin 99.4%
  • Other 0.6%