The usage of the Banuba SDK resources externally on Android
The usage of the Banuba SDK resources externally
By default, the SDK contains all the needed resources as a part of banuba_effect_player.aar
.
But there is an option to use the Banuba SDK resources externally, in other words, to separate the resources from the application.
They can be external packages or downloaded resources. This allows you to reduce the size of your application.
You can request a special build of the SDK with already separated resources or you can extraсt them manually.
To extract resources manually you should follow the steps below:
Change the extension of the
BanubaEffectPlayer/banuba_effect_player-release.aar
from.aar
to.zip
.Unzip the
BanubaEffectPlayer/banuba_effect_player-release.zip
.Make a backup of resources folder
bnb-resources
from here:BanubaEffectPlayer/banuba_effect_player-release/assets
.Delete the
bnb-resources
files from theBanubaEffectPlayer/banuba_effect_player-release/assets
folder.Go to the
BanubaEffectPlayer/banuba_effect_player-release
folder and compress its content.noteIt is important to compress the content of the folder, but not the folder itself.
Move the resulting archive to
BanubaEffectPlayer
folder.Rename the archive to
banuba_effect_player-release.aar
.
To use external resources, please follow the steps below:
Copy resource packages to application resources or implement the logic to download resources online during the application execution.
Update the path to the resources that you will pass into the initialization of the BanubaSdkManager
or the UtilityManager.
If you want to use both repacking and external resources, you should first repack the SDK and only then extract resources.
You should take care to check the resources version while using external resources.