Developer SDK

Java examples

Install the SDK · View source on GitHub ↗

Java SDK installation

Desktop Java uses the generated JNA wrapper over sdk/cgo (Java 17+). Android uses the existing gomobile AAR; it is a different artifact.

Publication status: new package coordinates below describe the intended public release. They are not yet all published. Build the local package while publication is being prepared.

Install with the native package manager

kotlin
implementation("io.ur:urnetwork-sdk:<version>")

Maven: add io.ur:urnetwork-sdk:<version> as a dependency. Android uses io.ur:urnetwork-sdk-android:<version> instead. Gradle repositories must include mavenCentral().

Supported platforms

Desktop packages bundle native resources for the supported 64-bit platforms. Android currently builds API 24+ for arm64, arm, and amd64. Keep one Go runtime binding per process.

GitHub and local builds

Maven and Gradle do not natively consume arbitrary Git dependencies. Clone sdk and run make -C sdk/java; install the resulting JAR and POM in Maven Local. JitPack support requires a tested root build and is not currently promised.

Examples

  • Integration: service provisioning, scoped client credentials and Device lifecycle.
  • Sockets: TCP/UDP, TLS/DTLS and HTTP client adapters.
  • Messages: live peer discovery and interoperable text/ACK exchange.
  • Provider: a provider client of your network with the consent disclaimer, status, payout wallet display and background run.
  • Embed: URnetwork inside your own app: one scoped client per installation from your backend, the in-app Device, and the installation's data caps; with the backend tool that provisions clients and sets caps.

Apps use URNETWORK_CLIENT_JWT and a persisted URNETWORK_INSTANCE_ID; only the service backend holds URNETWORK_ROOT_JWT. See the shared contract and official networking research.

Use an SDK release containing the required APIs. The package plan records package names, build outputs and publication gates.

References