mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
6ecb276a49b3a7c8f079e4ae8846c39eef4986ca
- Create WebxdcMediaSessionService: a MediaSessionService backed by a
stub SimpleBasePlayer that posts the system media notification when
webxdc apps play audio. Handles WEBXDC_AUDIO_STARTED/STOPPED/PAUSED/
RESUMED custom SessionCommands from WebxdcActivity and relays
notification play/pause button presses back to the WebView via
local broadcasts.
- Modify WebxdcActivity:
- Connect a MediaController to WebxdcMediaSessionService in onCreate
- Add notifyAudioStarted/Stopped/Paused/Resumed JS interface methods
in InternalJSApi (called from webxdc.js audio event listeners)
- Register a BroadcastReceiver for notification pause/resume to call
evaluateJavascript to pause/resume <audio>/<video> elements
- Override pauseWebViewOnPause() to keep WebView running in background
while audio is playing
- Release controller and send AUDIO_STOPPED on destroy
- Modify WebViewActivity: add pauseWebViewOnPause() hook so subclasses
can prevent webView.onPause() (e.g., during audio playback)
- Add audio/video event listener setup to webxdc.js that polls for
audio/video elements and calls InternalJSApi.notifyAudio* when
play/pause/ended events fire
- Register WebxdcMediaSessionService in AndroidManifest.xml with
foregroundServiceType=mediaPlayback
Agent-Logs-Url: https://github.com/ArcaneChat/android/sessions/57af82f8-b482-4d5a-977f-fc74ffd48db3
Co-authored-by: adbenitez <24558636+adbenitez@users.noreply.github.com>
…
ArcaneChat Android Client
A Delta Chat client for Android. Learn more at: https://arcanechat.me
WebXDC
This app has some extended support for WebXDC apps:
window.webxdc.arcanechata string with the ArcaneChat version and can be used by app developers to detect when they can use the ArcaneChat-specific features.sendToChat(): extra propertysubjectcan be set to a text string to set message/email's subject.sendToChat(): extra propertyhtmlcan be set to a string of html markup to set the HTML part of the email/message.sendToChat(): the file object parameter also accepts atypefield that can be one of:"sticker""image""audio""video""file"(default iftypefield is not present)
- Inside apps, clicking external links is supported, ex. to open in browser, so you can include links to your website or donation pages.
manifest.tomlfield:orientation, if you set it to"landscape"your app will be launched in landscape mode.
Credits
This app is based on the official Delta Chat client with several improvements.
This app uses a modified version of the Chatmail Core Library.
Description

