- 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>
Counterpart of https://github.com/chatmail/core/pull/6851
* Make sending of statistics into a setting
* feat: Count securejoin sources and UI paths
* feat: Rename self_reporting to send_statistics
* Adapt core's API change
* WIP, untested: Adapt to a rename on the core side
* Adapt to generated jsonrpc
* New strings and a new dialog
* Adapt to the API change
* Rewording: `...and support research`
* "More Info" button rather than link
* Small fixes
* Open the correct survey (though it doesn't work yet)
* Changelog
* Update help
* Fix compile error
* Fix compilation
* Revert submodule change
* Don't show a device message yet
* Move "Send Statistics" setting
* Fix compilation error
* Remove unused constant
---------
Co-authored-by: adb <adb@merlinux.eu>