AR Cloud Guide
AR Cloud is a client-server solution that helps to save space in your application. This is a product used to store AR filters on a server instead of in the SDK code. After being selected by the user for the first time, the filter is going to be downloaded from the server and then saved on the phone's memory.
- iOS
- Android
- Flutter
Example of using AR cloud
Banuba AR Cloud SDK delivery solution includes the BanubaARCloudSDK.xcframework
with BanubaUtilities.xcframework
libraries that should be placed into Frameworks folder
directory or added as an SPM dependecies to your project.
You can find these libraries here: BanubaARCloudSDK.xcframework, BanubaUtilities.xcframework
Follow these steps to integrate AR Cloud:
- Set up
banubaArCloudURL
loading...
- Initialize Banuba AR Cloud SDK
loading...
- Fetch the available effects list using the
getAREffects
method
loading...
- Download the effect, using the
downloadArEffect
method
loading...
Example of using AR cloud
Follow these steps to configure AR Cloud:
Installation of the ArCloud library
To start using Banuba SDK with ArCloud from GitHub Packages, add a custom maven repo to your
build.gradle
:
loading...
Add the ar-cloud
dependency to your build.gradle:
loading...
Initialization of the ArCloudKoinModule module in Koin
Koin - this is a framework to help you build any kind of Kotlin & Kotlin Multiplatform application, from Android mobile and Multiplatform apps to backend Ktor server applications. You can read more about Koin here.
In this example, we use Koin for dependency injection.
loading...
ArCloudKoinModule
is the AR Cloud module which should be initialized and placed before
MainKoinModule
.
MainKoinModule
is the Koin module which should be implemented in your application. It is
required for configuring AR Cloud dependencies.
Configuring of AR Cloud dependencies in DI layer
loading...
These are additional important classes:
- ArCloudMasksActivity -
this is the main UI module that configures
Player
with dependent UI components. - EffectWrapper - this is a data class that wraps an effect taken from an AR cloud.
- EffectsAdapter - this is an adapter for the RecyclerView component used to populate effects data.
- EffectsViewModel - the ViewModel component which is responsible for loading and providing the effect data.
You can use all classes mentioned above as examples or implement your own solution.
Usage of this feature is described on the ARCloud plugin page on Flutter Pub.
Real examples can be found in quickstart-flutter-plugin and the source code of Banuba arcloud-flutter.
Visit our FAQ or contact our support.