1. Documentation
  2. AppFlow
  3. POS Applications
  4. Guides

Guides


Get started

There are two approaches available for integrating your application with AppFlow

  1. Docs first - Follow this guide which will explain all the relevant AppFlow concepts and allow you to set up the application gradually
  2. Code first - Jump to the quick guide to get your application integrated with AppFlow, allowing you to interact with it and other applications before you dive into detailed documentation

Dependencies

As of AppFlow 2.1.0, all our AppFlow artifacts and its dependencies are published to jcenter, which is automatically used as a Maven repository by Android projects in Android Studio.

For releases prior to AppFlow 2.1.0, please include the following in your root build.gradle,

repositories {
    maven {
        url "http://dl.bintray.com/aevi/aevi-uk"
    }
}

The AppFlow APIs are built with Java 8 which means your application must compile with Java 8. Please see the official Android docs for how to compile/target Java 8.

Payment Initiation API

Add the dependency listing below in the dependencies section of your build.gradle file in order to integrate the Payment Initiation API.

implementation 'com.aevi.sdk.pos.flow:payment-initiation-api:<version>'

API Constants

The AppFlow APIs themselves are designed to facilitate communication between applications via a defined set of data structures. They are however decoupled from what the values or content of these data structures are, in order to keep them as flexible and configurable as possible. Instead, the data values are defined in this documentation and provided as constants via a separate library.

The constants library is stored in a separate repo. You can find the latest version details and view the defined data constants there.

To include these in your project use

implementation `com.aevi.sdk.flow:api-constants:<version>'

Migration

AppFlow v1

If your application is currently integrated with the first version of AppFlow, please see migration from v1 for details on how to update to v2.

Legacy Simple Payment API

If your application is currently integrated with the Public SDK - Simple Payment API v2.x.x, please read Legacy API support for compatibility and migration advice.

Sample Code

The documentation will refer to relevant sections of the samples. The Payment Initiation Sample is our open source sample that has two purposes;

  1. To provide a basic application developers can use to initiate flows and query AppFlow for information
  2. To provide code examples of how to interact with the Payment Initiation API

You can find the source code for the sample here, but it is usually more productive to clone the repo instead and work with the code in Android Studio.

API Overview

For details please see the Payment Initiation API Overview

Application guidelines

The following guidelines should be followed when you implement your application to work well with AppFlow and to provide a seamless and consistent experience for the merchant.

ProGuard

If you are using proguard to obfuscate your application you will need to ensure that the AEVI classes are not processed as AppFlow makes use of JSON serialisation and deserialisation for API models.

*dontwarn com.aevi**
*keep class com.aevi** { *; }

This can be done simply by including the following in your ProGuard file

Permissions

All communication between applications in a flow is sent as JSON which means the data between applications can be sent over any channel. By default the Android implementation of AppFlow will use the Android Messenger to send and receive messages. This means message sizes are limited to the size set by the Android Binder limit (usually max 1 MB). To avoid this issue AppFlow can be configured (via a configuration provider) to send messages over a Websockets instead.

Whether AppFlow uses Android Messenger or Websockets is down to the runtime configuration of FPS.

As Websockets are network based, all applications developed for AppFlow must request these permissions in the manifest.

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>

Next steps

At this point you we hope you have a good understanding of how AppFlow works and have a basic integration completed.

Problems? Questions?

If you are having any problems or questions, please check out our support pages.

Learn more about AppFlow

You can explore the full AppFlow documentation here.