Devkit (Android)
Nativeblocks provides hot-reloading and logging tools for developers
Devkit is a powerful debugging and logging and hot-reloading utility for Android applications.
Get started
Make sure that your project meets these requirements:
- Uses Android API level 26 or higher
- Uses Jetpack (AndroidX)
- Initialized Nativeblocks Core SDK
Add DevKit to your gradle app module
build.gradle
dependencies {
implementation("io.nativeblocks:nativeblocks-wandkit-android:1.1.0")
}
Let's get started by initializing the SDK, it can be inside of the onCreate's Activity or provide via dependency injection, but make sure DevKit calls after the Nativeblocks initialize
val devKit = DevKit.Builder()
.keepScreenOn()
.autoConnect()
.enableLogging()
.build()
NativeblocksManager.getInstance().wandkit(devkit)
Here is an example of how to integrate DevKit in an Android app:
package io.nativeblocks.sampleapp
import android.os.Bundle
import androidx.activity.ComponentActivity
import io.nativeblocks.wandkit.DevKit
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
NativeblocksManager.initialize(
...
)
if (BuildConfig.DEBUG) {
val devKit = DevKit.Builder()
.keepScreenOn()
.autoConnect()
.enableLogging()
.build()
NativeblocksManager.getInstance().wandkit(devkit)
}
...
}
}