Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google-cast v3 custom namespace

I am now refactoring my sender application for Android using the new v3 Google Cast API. The problem I encounter is when i add

List<String> namespaces = new ArrayList<>();
        namespaces.add("urn:x-cast:lalalalla");
...
return new CastOptions.Builder()
     .setSupportedNamespaces(namespaces)

the Android app does not display the chromecast icon anymore (I guess it does not discover chromecast devices anymore). What am I doing wrong with the namespace as without .setSupportedNamespaces it works fine as in the sample app? Thanks!

like image 975
LillyOfTheValley Avatar asked Jul 01 '16 09:07

LillyOfTheValley


1 Answers

This method can be a tad misleading sometimes. setSupportedNamespaces(ns) actually modifies the filter criteria for Cast devices for your app.

ie. it will only display Cast Devices currently running a receiver supporting the namespaces you specify. Unless this is what you want I'll advise to remove this call, you can still use custom namespaces when you're connected to your cast Device (after starting or joining a Cast Session)

like image 60
mauimauer Avatar answered Nov 03 '22 03:11

mauimauer