Nativeblocks Foundation
This document provides an overview of the Nativeblocks Foundation blocks and utilities. These blocks serve as fundamental components, enabling developers to build dynamic and customizable user interfaces using Jetpack Compose. Additionally, utility functions and extensions enhance development workflows and integrate seamlessly with server-driven UI frameworks.
All the blocks described below are core blocks provided by Nativeblocks Studio, making them readily available for use in projects.
Getting Started
To integrate NativeblocksFoundation into your Android project, follow these steps:
1. Add the Library to Your Project
Include the Nativeblocks Foundation library in your project's build.gradle file:
dependencies {
implementation("io.nativeblocks:nativeblocks-foundation-android:1.0.0")
}
2. Initialize Nativeblocks in Your Application
Import and register the Nativeblocks Foundation blocks in your application class or entry point:
import io.nativeblocks.NativeblocksManager
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
NativeblocksManager.initialize(this)
// Register foundation blocks
FoundationBlockProvider.provideBlocks()
}
}
3. Start Using Nativeblocks Foundation Blocks
After registering the foundation blocks, you can use them directly in your Compose-based layouts to create server-driven UIs.