mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-20 13:40:08 +00:00
Build 60: Scan-to-pay gets a Scan | My Code toggle, yellow QR, native share
Cash App-style scan screen: a segmented Scan | My Code control (new w::segmented) over either the camera or your own payment QR. My Code shows the @handle above a big nprofile QR with the Goblin mark nested in a YELLOW center (was white — same 19% footprint, yellow reads as light to a scanner so the High-ECC recovery is unchanged), and a native Share button. Added share_text to PlatformCallbacks (Android ACTION_SEND text/plain via a new shareText JNI method; desktop falls back to clipboard) to share the npub + nprofile link.
This commit is contained in:
@@ -510,6 +510,15 @@ public class MainActivity extends GameActivity {
|
||||
startActivity(Intent.createChooser(intent, "Share data"));
|
||||
}
|
||||
|
||||
// Called from native code to share plain text (e.g. a payment link) via the
|
||||
// system share sheet.
|
||||
public void shareText(String text) {
|
||||
Intent intent = new Intent(Intent.ACTION_SEND);
|
||||
intent.putExtra(Intent.EXTRA_TEXT, text);
|
||||
intent.setType("text/plain");
|
||||
startActivity(Intent.createChooser(intent, "Share"));
|
||||
}
|
||||
|
||||
// Called from native code to play a short "error" haptic (rejected payment).
|
||||
public void vibrateError() {
|
||||
Vibrator vibrator = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE);
|
||||
|
||||
Reference in New Issue
Block a user