6

I want to change the text "Default Media Receiver" which is displayed on the audio playback page of the Chromecast Default Media Receiver, but not the video playback page, to anything but that. I'm developing an Android app.

I'm having difficulty getting my website hosting service to enable SSL. They won't do it unless I upgrade to dedicated IP address even for a self-signed cert, at considerable expense). So I'm stuck with a choice between styled receiver/no stylesheet, and the Default Media Receiver. (Yes, a change of hosting services is in the wind. Don't ask).

I rather prefer the appearance of the Default Media Receiver. It starts up faster, and the Cast icon on the startup page instead of my app name is nicer.

Except for one small irritating detail. When playing audio tracks on the Default Media Receiver, the title of the application ("Default Media Receiver") is displayed on the otherwise very beautiful page on the Chromecast device when playing audio tracks.

Is there any way to change this without resorting to a styled media receiver?

(eyeroll directed to response in comment...Here's the code. I already described what I tried.)

  @Override
  public CastOptions getCastOptions(Context context) {
    return new CastOptions.Builder()
    // Use this line for styled/no-style-sheet.
    //.setReceiverApplicationId(context.getString(R.string.cast_app_id))
    // use this line for default receiver.
    .setReceiverApplicationId(
       CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID)
    .build();
  }
Robin Davies
  • 7,547
  • 1
  • 35
  • 50
  • Can you add any details like: code used, error problem encountered? [How do I ask a good question?](http://stackoverflow.com/help/how-to-ask), [How to create a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve) Show the community what you have tried. – abielita Jun 26 '18 at 18:18
  • 2
    @abielita Seems to me you should at least have some familiarity with the problem domain before you make a comment like that. Completely boilerplate code provided per your request. Problems encountered (and what I tried) were completely described before the revision. Have at it. – Robin Davies Jun 27 '18 at 19:54
  • Hi @RobinDavies, Have you go the solution for this? – Pramod Oct 28 '18 at 11:56

2 Answers2

1

There is now an option to use a "Styled Media Receiver" without having to serve content from your own Web Servers.

Go to your Application registration on the Google Cast DSK Developer site. Edit your application details to be a "Styled Media Receiver", and leave the "Skin URL" blank. Edit the rest of the details accordingly. The name you supplied in the App registration details will show as the ChromeCast device connects to your app. And your app logo will appear in the place in the Chromecast UI that used to say "Default Media Receiver".

You must also make sure you have the following code:

public CastOptions getCastOptions(Context context) {
    return new CastOptions.Builder()
    .setReceiverApplicationId(context.getString("YOUR APPLICATION ID"))
    .build();
  }

And you must (of course) PUBLISH the changes you made to the Application Registration (or add your phone as a test device).

Robin Davies
  • 7,547
  • 1
  • 35
  • 50
0

This is not currently possible. I have filed a feature request for this here: https://issuetracker.google.com/issues/156888250

donturner
  • 17,867
  • 8
  • 59
  • 81