user1724641
user1724641

Reputation: 331

onCreatePresentation of CastRemoteDisplayLocalService never called

I created a CastRemoteDisplayLocalService descendant following the official docs.

OnCreate is called, onCreatePresentation never. What can be the reason behind this?

I used this code as an example: https://github.com/pasha656/Chromecast/tree/master/CastDisplay I had different package names but the same app ID - maybe this can be a problem. I tried to search the official docs whether app IDs and packages are linked together - no success, no info so far.

Upvotes: 1

Views: 332

Answers (1)

Sreenu Yatam
Sreenu Yatam

Reputation: 166

The above referred project and my project are calling onCreatePresentation() for me. I am not sure what are you missing

I would recommend you to follow the below steps and see if you can figure out something

  1. Download this project : https://github.com/syatam/Cast-Remote-Display
  2. Import to Android Studio and install it on Android mobile
  3. App launches => Click on PLAY and select the chromecast device
  4. When the app is connected with chromecast device, you should see onCreatePresentation() is being called in your logcat messages.

Share me your sample project if you are unable to figure out. I can take a look at it.

Upvotes: 3

Related Questions