1

[Google Cast, Android] I created an app_id and tried the sample project(CastHelloText-android) on both my phone and emulator(4.2.2 Google APIs), cast icon doesn't show up. But the Chrome browser plugin works OK (can find and connect my Cast device).

I also tried an old TicTacToe app, it WORKS OK for both my phone and emulator.

Is there any problem for the new cast SDK or did I do something wrong? Can anyone give some clues? Thanks a lot!

BTW: I've registered my device and the status is "Ready For Testing".

apt
  • 21
  • 1
  • Can you open the "http://:9222" from a chrome browser on your wifi network? If not, the your device is not whitelisted, you need to follow the steps for doing that, see this post: http://stackoverflow.com/a/21619494/2765813 – Ali Naddaf Feb 23 '14 at 02:08

1 Answers1

0

Make sure you've defined the onResume and onPause methods:

@Override
protected void onResume() {
    super.onResume();

    // Add the callback to start device discovery
    mediaRouter.addCallback(mediaRouteSelector, mediaRouterCallback,
            MediaRouter.CALLBACK_FLAG_PERFORM_ACTIVE_SCAN);
}

@Override
protected void onPause() {
    // Remove the callback to stop device discovery
    mediaRouter.removeCallback(mediaRouterCallback);
    super.onPause();
}