- 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>
* add a warning to the existing hint; desktop and iOS will pick that up without code changes
* add hint to the relay list
* add padding
* move relay up
* update CHANGELOG
* make spotless happy
* show 'remove relay' items in red
* show concrete meaning of 'default' or 'main'
* prepare for showing 'unpublished' state
* rework 'remove relay' dialog
* fix RPC building doc and remove temp. file
* add hint to be shown below relay list
* adapt to new core api
* use listTransportsEx()
* use rpc.setTransportUnpublished()
* keep hidden
* tweak remove dialog in case the relay is already hidden
* adapt to chat.delta.rpc.types.TransportListEntry classname
* remove outdated autogenerated file
* update CHANGELOG
* simplify deletion
* make spotless happy
* change button order so hide/delete are not together usually; this matches also more the gist of positive/negative/neutral
* Update src/main/res/values/strings.xml
Co-authored-by: Hocuri <hocuri@gmx.de>
* the dialog wording fits better when already hidden now
* move similar strings together, make translation easier
* actions are 'Title Case', however, this usually applies to nouns, verbs, adjectives, first and last word only, not to prepositions as 'from'
---------
Co-authored-by: Hocuri <hocuri@gmx.de>