---
title: "The widget, inside your app. (Android)"
url: "https://platformdocs.coinme.com/#/build/native/android"
markdown: "https://platformdocs.coinme.com/pages/build/native/android/overview.md"
summary: "CoinmeBridge loads the Orchestrator in a WebView, runs the bridge handshake, sends one configuration object and reports back through typed callbacks. You decide whether it takes the screen or sits inside your own chrome."
surface: "ramp"
platform: "android"
package: "CoinmeBridge for Android"
version: "1.3.0"
---

# The widget, inside your app.

CoinmeBridge loads the Orchestrator in a WebView, runs the bridge handshake, sends one configuration object and reports back through typed callbacks. You decide whether it takes the screen or sits inside your own chrome.

## What the SDK is

A Kotlin library with one fragment. CoinmeFragment owns the WebView, performs the bridge handshake, mounts the purchase flow and reports through a CoinmeListener. Everything the host does happens around it.

- **One fragment**: CoinmeFragment.newInstance(orchestratorUrl, config). Show it in an Activity or add it to a container. Set the listener before it attaches; the session starts in onViewCreated.
- **One config, one listener**: Everything the Orchestrator needs travels in a single CoinmeConfig. Everything it reports comes back through four CoinmeListener methods: session ready, session ended, an event, an error.
- **The partner key identifies your app**: The SDK sends your partnerKey in the handshake to identify your app to the Widget. Native integrations need it; a wrong or empty value means the widget loads but the session never becomes ready. Keep it in runtime configuration with your rampId.

## Two ways to put it on screen

Present it and the SDK takes the whole screen. Embed it and you keep your own chrome around it, as the demo app does with its slide-in panel and back chevron.

The page switches between the two presentations. The table compares them; the code for each follows.

| Presentation | What it is | Detail | You own | Best for |
| --- | --- | --- | --- | --- |
| Present (Simplest) | Let it take the screen | The SDK configures itself for full-screen modal presentation. One call; nothing else to lay out. | Nothing on screen while the widget is up | Checkout-style hand-offs |
| Embed (Your chrome) | Host it inside your own surface | Add the SDK view as a child and constrain it. You keep your back button, your panel animation, your native surface underneath, as the demo does. | Containment, loading state, the chrome around it | A widget that feels like part of your app |

### Present: Let it take the screen

```kotlin
val fragment = CoinmeFragment.newInstance(
  orchestratorUrl = Constants.ORCHESTRATOR_URL,
  config = config
)
fragment.listener = this
supportFragmentManager.beginTransaction()
  .replace(android.R.id.content, fragment)
  .commit()
```

### Embed: Host it inside your own surface

```kotlin
supportFragmentManager.beginTransaction()
  .add(R.id.orchestrator_container, coinmeFragment, TAG)
  .commit()

// hide / show without recreating
supportFragmentManager.beginTransaction()
  .hide(coinmeFragment)
  .commit()
```

This section shows the iOS demo app's patterns in Kotlin against the CoinmeBridge Android SDK.

- [The Bridge explainer](https://platformdocs.coinme.com/pages/explainers/bridges.md)
- [CoinmeConfig field reference](https://platformdocs.coinme.com/pages/build/index.md#config)
- [Quick start on docs.coinme.com](https://docs.coinme.com/docs/android-quick-start)
