The PhotoEditor SDK is an exceptional tool for adding exceedingly powerful photo editing capabilities to your Android applications. In this article, we will guide you through the process of integrating this SDK seamlessly into your Android project.
Overview of the SDK
The PhotoEditor SDK comes with a vast array of features that allows for real-time editing, including over 60 handcrafted filters, custom filter design capabilities, overlay tools, and various adjustment functionalities. Additionally, all editing operations are non-destructive, meaning you can revise images easily and retain an intuitive workflow.
Initial Setup
- Ensure your project meets the following SDK requirements:
- Minimum SDK Version: 21 (Android 5.0)
- Compile SDK Version: 31+
- Integrate the PhotoEditor SDK Repository into your Gradle build file.
- Add your license file to the application’s assets folder—this is crucial for using the SDK.
Configuring Your Project
Begin by editing your project’s `build.gradle` file to include the appropriate dependencies:
buildscript {
repositories {
jcenter()
google()
maven url "https://artifactory.img.ly/artifactory/imgly"
}
dependencies {
classpath "ly.img.android.pesdk:plugin:10.10.0"
}
}
Next, apply the necessary plugins in your module’s `build.gradle`:
apply plugin: "com.android.application"
apply plugin: "ly.img.android.sdk"
Setting Up the Editor
To customize the editor, utilize the PhotoEditorSettingsList. Think of it like setting up a buffet where you can choose what to serve your guests:
- You start with an empty platter (SettingsList).
- Next, you add dishes (configuration settings)—like filter options, text settings, overlays, and stickers—according to the tastes of your users.
- Finally, you present your beautiful buffet (photo editing UI) ready for users to indulge in.
In your activity, you can initialize and configure the editor settings like this:
private fun createPESDKSettingsList() =
PhotoEditorSettingsList(true)
.configureUiConfigFilter { it.setFilterList(FilterPackBasic.getFilterPack()) }
.configureUiConfigText { it.setFontList(FontPackBasic.getFontPack()) }
.configureUiConfigFrame { it.setFrameList(FramePackBasic.getFramePack()) }
.configureUiConfigOverlay { it.setOverlayList(OverlayPackBasic.getOverlayPack()) }
.configureUiConfigSticker {
it.setStickerLists(
StickerPackEmoticons.getStickerCategory(),
StickerPackShapes.getStickerCategory()
) }
Running the Editor
Once you have your settings in place, launching the editor is straightforward. This can be initiated with a simple method that opens the editor activity with your specified settings:
PhotoEditorBuilder(this)
.setSettingsList(createPESDKSettingsList())
.startActivityForResult(this, PESDK_RESULT)
Troubleshooting Tips
If you encounter issues during integration or while using the SDK, here are some quick troubleshooting ideas:
- License Not Found: Ensure that your license file is correctly placed in the assets folder and that it’s named LICENSE.
- Gradle Sync Issues: Double-check your project’s build settings, especially the compileSdkVersion and libraries.
- Permissions Not Granted: Ensure your app has the necessary permissions for camera and storage access. You can handle permissions using the built-in methods.
- For customized support, collaborate on your projects or find updates about our offerings at fxis.ai.
Final Thoughts
Integrating the PhotoEditor SDK into your Android application opens up a world of possibilities for providing enhanced user experiences through creative photo editing capabilities.
At fxis.ai, we believe that such advancements are crucial for the future of AI, as they enable more comprehensive and effective solutions. Our team is continually exploring new methodologies to push the envelope in artificial intelligence, ensuring that our clients benefit from the latest technological innovations.

