The Scan component is supported in the native AAR mode, the mPaaS Inside mode, and the component-based mode. If you want to connect to and use mPaaS as other SDKs, we recommend that you use the native AAR mode.
The native AAR mode uses the native Android AAR-based packaging solution, and therefore is closer to the technology stack of Android developers. This access method frees you from the need to understand mPaaS-related packaging knowledge. You can integrate mPaaS into your projects by using the mPaaS Android Studio plug-in. This method reduces your access costs and makes it easier for you to get started with mPaaS.
To help you get familiar with the native AAR mode, this tutorial describes how to add the Scan component in the native AAR mode and how to use the scan feature.
This tutorial contains the following five parts:
- Create an application in Android Studio
- Create an application in the mPaaS console
- Access a project in the native AAR mode
- Use the scan feature in a standard UI
- Use the scan feature in a custom UI
- How to create an Android app that displays Toast when a button is tapped
- How to access a project in the native AAR mode.
- How to use the scan feature in a standard UI.
- How to use the scan feature in a custom UI.
- The development environment is configured. In this tutorial, the development environment in Windows is taken as an example.
- A web browser is installed. The Chrome browser is recommended.
- An Android phone and the supporting data cable are prepared. The operating system version is Android 4.3 or later. You can also use a simulator for debugging. This tutorial uses a simulator as an example.