diff options
Diffstat (limited to 'packages/meshbay-android/app/src/main/assets/bridge')
| -rw-r--r-- | packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js b/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js index b71b5e8..edfdb11 100644 --- a/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js +++ b/packages/meshbay-android/app/src/main/assets/bridge/meshbay-bridge.js @@ -186,6 +186,33 @@ keepAlive: (on) => call('playback:keep-alive', on === true), }, + // Notifications while closed: fetched, or pushed through a UnifiedPush + // distributor when the phone has one. Phone-only: the + // desktop preload has no counterpart, so `platform.push` is absent there. + push: { + status: () => call('push:status'), + enable: () => call('push:enable'), + disable: () => call('push:disable'), + remember: (subscription, account, secret, since) => + call('push:remember', subscription, account, secret, since), + }, + + // Photo backup (§9.12): the phone lists its photos, keeps what was sent, + // and hands each photo's bytes over at /photosync/<token> on this origin. + // The page decides when and does the sending. Phone-only, like `push`. + photoSync: { + status: () => call('photosync:status'), + permit: () => call('photosync:permit'), + albums: () => call('photosync:albums'), + configure: (settings) => call('photosync:configure', settings || null), + estimate: (settings) => call('photosync:estimate', settings), + plan: () => call('photosync:plan'), + sent: (token, dir, name) => call('photosync:sent', token, dir, name), + completed: () => call('photosync:completed'), + failed: (code, text) => call('photosync:failed', code, text), + keepAlive: (on, text) => call('photosync:keep-alive', on === true, text || ''), + }, + // Where downloads go, chosen once. A display name comes back, never a URI. folder: { choose: () => call('folder:choose'), |