Skip to content

Android

Installation

To use the Android Hypen SDK, you can add the following to your build.gradle file:

gradle
dependencies {
    implementation 'space.hypen:hypen-android:$hypenVersion'
}

Creating a client

To create a Hypen client, you can use the following code:

shell
npm hypen add android

This will create a new directory called android with a basic Hypen Android app code and a build.gradle file. You can then open the directory in Android Studio and run the app or edit it as necessary. To build the app (in debug, for release click here for more info), run:

shell
npm hypen build android

Embedding a Hypen app

To use, instantiate a HypenRenderer component and pass in the Hypen app file as a string or a URL.

kotlin
    HypenRenderer(modifier = Modifier.fillMaxSize(), 
    hypenApp = fromUrl {
        url = "https://myserver.com/app.hypen"
    })

or

kotlin
    HypenRenderer(modifier = Modifier.fillMaxSize(), 
        hypenApp = fromFile {
            file = File("app.hypen")
    })