FrakSharing
Ce contenu n’est pas encore disponible dans votre langue.
class FrakSharing
The Frak sharing sheet. Build it once per screen, warm it when a share affordance becomes visible, then present on the tap.
A sheet that is up survives a configuration change, but not process death. Use one instance per Activity: two share a warm web view and a “one sheet at a time” guard, and after a configuration change a live session reports to whichever was built first, not whichever presented.
| Name | Summary |
|---|---|
| Builder | class Builder(callback: FrakSharing.ResultCallback) Builds a FrakSharing against a hosting Activity. |
| ResultCallback | fun interface ResultCallback How a sharing session ended. Always invoked on the main thread, and it can arrive after the hosting Activity is destroyed, so write it defensively. Should be a stable reference. |
Functions
Section titled “Functions”| Name | Summary |
|---|---|
| present | fun present(request: SharingRequest) Opens the sheet. No-op if the hosting Activity is finishing, destroyed, or not at least STARTED. |
| warm | fun warm() Starts warming the pooled web view and the identity/config reads. Call when a share affordance becomes visible; cheap to call repeatedly, and present implies it. |