Reputation: 490
Cast.CastApi.launchApplication(mApiClient, "XXX", false)
.setResultCallback(
new ResultCallback<Cast.ApplicationConnectionResult>() {
@Override
public void onResult(Cast.ApplicationConnectionResult result) {
Status status = result.getStatus();
if (status.isSuccess()) {
ApplicationMetadata applicationMetadata =
result.getApplicationMetadata();
String sessionId = result.getSessionId();
String applicationStatus = result.getApplicationStatus();
boolean wasLaunched = result.getWasLaunched();
} else {
Toast.makeText(MainActivity.this, String.valueOf(status.getStatusCode()), Toast.LENGTH_SHORT).show();
Log.e("Status-Cast", String.valueOf(status.getStatusCode()));
teardown();
}
}
});
I am trying to get a test chrome cast app working but I keep getting a APPLICATION_NOT_FOUND error (2004). I have check my application ID and I can access the url in my browser. It is an unpublished app which I am testing on my device that is registered on the dev console.
Any help would be great.
Upvotes: 0
Views: 596
Reputation: 7132
Typically, this occurs when you haven't [x] send your serial # to Google on your device, haven't registered your device in the developer console, or you haven't restarted your Chromecast device 20 minutes after you changed something in the developers console.
Upvotes: 2