Sparkling SDK - Android
This page documents the native Android SDK APIs for hosting Sparkling content.
For the hybrid://... URL format, see Scheme.
Dependency
Initialization (Application.onCreate)
Sparkling containers require HybridKit to be initialized before opening any pages:
Open a page (full-screen Activity)
Create a SparklingContext, set a scheme, then navigate:
Key APIs:
Sparkling.build(context, sparklingContext): constructs a Sparkling instance.Sparkling.navigate(): startsSparklingActivityand loads the scheme.
Embed a container view
Instead of starting an Activity, you can create a SparklingView:
Customize loading/error/toolbars
Implement SparklingUIProvider and attach it to SparklingContext:
getLoadingView(context): loading UIgetErrorView(context): error UIgetToolBar(context): optional customToolbarused bySparklingActivity

