Questions tagged [mediarouter]

29 questions
17
votes
0 answers

How to reliably fetch and detect changes to the active audio route on Android?

I have a feature where I need to fetch current AND detect switch of the active audio output device of the system. Something like: run app -> fetch current device (which might be embedded speakers) connect bluetooth speaker -> detect switch to…
7
votes
1 answer

Android MediaRouter Volume events

I want to implement volume change as seen in Youtube app while casting, like if app is in background or on lock screen Like this private void createSession() { ComponentName receiver = new ComponentName(getPackageName(),…
ingsaurabh
  • 15,249
  • 7
  • 52
  • 81
2
votes
2 answers

Flutter multiscreen using DisplayManager or MediaRouter

I'm developing an app in Flutter which is supposed to run on a POS with two screens. It's basically a tablet connected to another screen via a HDMI cable. My problem is that whatever I run on my side of the screen also appears to the client's…
2
votes
0 answers

How to fix crash : ExoPlayer cast extension on Android 9

I have a crash in production since I've have release the ability to cast HLS video from my app to a Chromecast using the ExoPlayer Cast Extension. It happens 100% on Android 9 and on a variety of devices (Xiaomi Redmi K20, Samsung Galaxy S9,…
1
vote
2 answers

How to find the name of the currently selected media output?

What is the correct way to retrieve the name of the currently selected media audio output on Android? I have looked into the Audio Manager and Media Router APIs, but not been able to see any way of retrieving which of the audio devices is the…
ascu
  • 1,029
  • 1
  • 19
  • 33
1
vote
0 answers

Android MediaRouter splitting audio and video routes to play video on external display via Presentation and audio via bluetooth

I am writing an app that utilizes an external display (HDMI and/or wireless miracast or chromecast display) to play video in a Presentation via the DisplayManager I am trying to force the audio from that video to play via a bluetooth a2dp profile if…
Johnny C
  • 1,799
  • 1
  • 16
  • 27
1
vote
0 answers

MediaRouter BT active audio source id or MAC address

I need the active audio source id or MAC address to compare it with my own list of Bluetooth devices. MediaRouter.getSelectedRoute gives very basic information like the name, type of the device. I see there is a getAddress() API which is hidden in…
Siju
  • 2,585
  • 4
  • 29
  • 53
1
vote
0 answers

How to keep the MediaRouter running in background activity?

please I need your help after searching a lot without issues. I have an demostration app to use an second screen attached to my device. I have the source code of the app, they use the Mediarouter class and an class named LauncherSecondScreen…
SlimSof
  • 11
  • 1
1
vote
1 answer

MediaRouter - Display content to second screen

I am a rookie to Android and doing my best to learn - don't throw rocks please. Thanks to the awesome example of @commonsguy at:…
DanielSZ
  • 48
  • 6
1
vote
0 answers

Send an intent to cast a youtube video on a MediaRoute in Android?

From my Android App I would like to start casting a youtube video on a ChromeCast. I understand, that to start casting I will need to use the Media Router API. Is that possible to cast youtube videos using Media Router API? I have not found any…
Skip
  • 6,240
  • 11
  • 67
  • 117
1
vote
1 answer

How to share a video between Android devices using MediaRouting

Currently I'm getting into the MediaRoute Android classes. I've followed and understood the examples and I'm trying to share a video between two devices, for instance, two tablets with the same hardware. I have two custom apps. The MediaRouter…
Nagrien
  • 36
  • 5
1
vote
1 answer

Extend MediaRouteButton behaviour

I'm building an app that can cast to both Chromecast and AppleTV devices. Discovery of these devices is working: ChromeCasts are discovered using the MediaRouter and AppleTVs are discovered using SSDP. At the moment, I have a regular button that…
Alex Meuer
  • 1,621
  • 3
  • 26
  • 37
1
vote
0 answers

Is it possible to use the MiniControllerFragment with a custom MediaRouteProvider?

Is it possible to have Google's cast MiniControllerFragment work with my custom MediaRouteProvider? The reason I ask: The mini-controller button UI doesn't appear when I cast to my custom MediaRouteProvider. I notice MiniControllerFragment[1] uses…
ukdiveboy
  • 65
  • 7
1
vote
1 answer

MediaRouterProvider not visible in the network

I created a SampleMediaRouteProvider as given in https://github.com/googlesamples/android-MediaRouter. In this sample there is also a MediaRouter that discovers all MediaRouteProviders in the network. This SampleMediaRouteProvider is visible in…
1
vote
1 answer

How can I style the title of a MediaRouter dialog?

I'm using mediarouter-v7 v23.1.1 to show a chromecast / media router chooser dialog. Now I try to style this thing - while I could change the background color and list item text style with this: