The Open GoPro (OGP) Kotlin Multiplatform (KMP) SDK provides a simple Coroutines-powered API to connect to GoPro cameras and exercise the Open GoPro Bluetooth Low Energy and Wi-Fi / USB HTTP APIs.
Currently only Android is fully supported. iOS is mostly untested but there are plans to fully support it soon.
Note! This README is only an overview of the library.
Complete Documentation can be found at Open GoPro
NOTE!! The library is not yet available on Maven so this project is currently only intended to be interacted with using the demo app provided in the repo.
This should be resolved soon...
The SDK needs permissions relating to Bluetooth, WiFi, and disc writing.
You can find an example in the demo app:
To see a simple demo app that demonstrates most of the SDK, build and load the composeApp project from TODO.
General usage is:





Note! This section contains only an overview. Complete API documentation for the OGP KMP SDK can be found on Open GoPro.
The general procedure is:
Initialize the SDK
// App context is platform-specific context passed from application
val sdk = OgpSdk(Dispatchers.IO, appContext)
Discover and connect to a GoPro Device. A successful connection will store it in the SDK's (runtime) database.
// Discover and take the first device we find
val device = sdk.discover(NetworkType.BLE).first()
// Connect (assume success)
val goproId = sdk.connect(device).getOrThrow()
Now that the device is connected and stored in the SDK, retrieve the GoPro object from the SDK. This can be done any number of times after connection.
// Now retrieve the gopro (assume success)
val gopro = sdk.getGoPro(goproId).getOrThrow()
Manipulate the retrieved GoPro as desired
// Set the shutter
gopro.commands.setShutter(true)