Integrate alby into your mobile app with our SDK
The alby SDK enables you to use the Alby Widget in your app. We offer two versions of the SDK - one for Android and another one for iOS.
Requirements
Before installing the SDK make sure you already have a brand created at alby and that you've already loaded at least some of your products to our system.
Documentation
iOS
You can find a full example in our GitHub repository.
Installation
The iOS version only works for apps using SwiftUI.
You can install Alby for iOS using Swift Package Manager. Add https://github.com/albycom/alby_widget_ios
as a Swift Package Repository in Xcode and follow the instructions to add AlbyWidget as a Swift Package.
Setup and Configuration
The alby widget works as an extension for any SwiftUI view.
Depending on how your view is structured the keyboard inside the bottom sheet might not work as expected. Make sure that you place the widget inside a ScrollView so the keyboard can scroll and the content be displayed.
import AlbyWidget
struct MyView: View {
var body: some View {
ScrollView {
Text("Hello")
}.addAlbyWidget(productId: "your product id", brandId: "your-brand-id")
}
}
You can find a full example in the GitHub repository of the SDK.
Installation
AlbyWidget for Android requires a SDK 29+ and Jetpack Compose.
Gradle Kotlin
implementation("com.alby.widget:alby-widget:<version>")
implementation 'com.alby.widget:alby-widget:<version>'
<dependency>
<groupId>com.alby.widget</groupId>
<artifactId>alby-widget</artifactId>
<version><version></version>
</dependency>
Setup and Configuration
AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
import com.alby.widget.AlbyWidgetScreen
AlbyWidgetScreen(brandId = "your-brand-id", productId ="your-product-id" ) {
YourScreenGoesHere()
}