The version of Play Services on your emulator does not support 9.2.0. Currently, I do not think that the image with the emulator supports 9.2.0. Your parameters should decrease to 9.0.2 or run on a real device until an updated emulator image is released.
If you look closely at your logcat output, you will see the following message:
W/GooglePlayServicesUtil: Google Play services out of date. Requires 9256000 but found 9080030
You can see the version number of the GPS that the emulator uses, by selecting Settings / Applications, find Google Play Services and click on it to get information about the application.
You can get the GPS version number from the code by calling GoogleApiAvalability.GOOGLE_PLAY_SERVICES_VERSION_CODE .
This answer contains some related information about the emulator versions.
Update for Adrian Cretu's questions regarding real devices
My experiments show that a Cast application running on a real device can detect an older version of Play Services and trigger permission processing. I experimented with the CastVideos app. My solution may not be the best, but it demonstrates the concept. I created a new action that starts at startup and checks for the existence of Services Services. I modified the manifest to make this action a launch activity, not a VideoBrowserActivity :
public class InitActivity extends AppCompatActivity { private static final String TAG = "InitActivity"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); GoogleApiAvailability googAvail = GoogleApiAvailability.getInstance(); int status = googAvail.isGooglePlayServicesAvailable(this); Log.i(TAG, "onCreate: Status= " + googAvail.getErrorString(status)); googAvail.makeGooglePlayServicesAvailable(this) .addOnCompleteListener(new OnCompleteListener<Void>() { @Override public void onComplete(@NonNull Task<Void> task) { Log.i(TAG, "onComplete: Done"); if (task.isSuccessful()) { Log.i(TAG, "onComplete: Starting VideoBrowser"); startActivity(new Intent(InitActivity.this, VideoBrowserActivity.class)); finish(); } else { Log.e(TAG, "onComplete: RESOLUTION FAILED"); } } }); } }
If Play Services is present, updated, and VideoBrowserActivity on, a task that checks for availability completes immediately and launches VideoBrowserActivity , the initial launch activity. Otherwise, a dialog box appears informing the user that the Play Services needs to be updated, and after the user agrees, the Play Store opens and the user can start downloading the latest version.
I could not find a way to return to VideoBrowserActivity . I had to restart the application. With a lot of work, I think a clean recovery from obsolete Service Services is possible. At least something is better than a crashing application.