How to detect if Chromecast is already connected on Android Sender?

Romulus Urakagi Ts'ai

I have an Android sender for Google Cast, and a Chromecast. I can cast video to a TV, and the cast button on actionbar becomes white.

Now comes the question. When I leave the sender app, Chromecast continues to play video. This is what I want. But when I re-open the sender app, I don't know how to detect if the devices is already running my receiver, so I need to automatically join current session.

Can anyone help? Thank you!

Ali Naddaf

joinApplication() has three different variations; in one of them, you can specify an applicationId and join happens successfully only if the cast device is running that application.

If you want to join when not only the same app is running, but also still in the same session that you had started before, you need to persist the sessionId each time you launch an app and then use another variation of the joinApplication() that takes an applicationId and a sessionId.

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

How detect the devices connected to wif network

分類Dev

How to detect Hint sender-control in OnHint event-handler?

分類Dev

How to reliably detect if an external keyboard is connected on iOS 9?

分類Dev

How can a JavaScript app detect if a Leap Motion device is connected

分類Dev

How to detect click event of connected Bluetooth peripheral device (Selfie stick)?

分類Dev

How to disconnect android device from chromecast if onApplicationDisconnected was called

分類Dev

Handling Chromecast load errors in web-based sender

分類Dev

How to detect the turnover motion in android?

分類Dev

How to detect a call Drop in android

分類Dev

Detect rings/circuits of connected voxels

分類Dev

How to detect if android application is minimized or not in Android Kotlin

分類Dev

How to know the sender in KVO?

分類Dev

How to Chromecast-enable a website?

分類Dev

How to detect Daylight Saving Time transition in android

分類Dev

How to addTarget to UIButton without sender

分類Dev

How to detect programmatically if "Android App" is running in chrome book or in Android phone

分類Dev

Core Data - detect if the database store was already created or not

分類Dev

Chromecast Web Sender API:オーディオトラックを切り替える

分類Dev

How to run android app in all connected devices or emulators at the same time from Android Studio?

分類Dev

How do I detect fail to connect wifi in android?

分類Dev

how to detect if the drop down menu is shown above or below the spinner in android?

分類Dev

How to detect installed Chrome version from my Android App?

分類Dev

How to detect installed Chrome version from my Android App?

分類Dev

How to detect screen orientation in a master/detail flow in android

分類Dev

How to check if MQ is connected

分類Dev

How are these nested vectors connected?

分類Dev

How to view that Advertiser is connected

分類Dev

How do I tweak "sender" in an event?

分類Dev

How to get the DataGridTextColumn sender's datagrid parent

Related 関連記事

  1. 1

    How detect the devices connected to wif network

  2. 2

    How to detect Hint sender-control in OnHint event-handler?

  3. 3

    How to reliably detect if an external keyboard is connected on iOS 9?

  4. 4

    How can a JavaScript app detect if a Leap Motion device is connected

  5. 5

    How to detect click event of connected Bluetooth peripheral device (Selfie stick)?

  6. 6

    How to disconnect android device from chromecast if onApplicationDisconnected was called

  7. 7

    Handling Chromecast load errors in web-based sender

  8. 8

    How to detect the turnover motion in android?

  9. 9

    How to detect a call Drop in android

  10. 10

    Detect rings/circuits of connected voxels

  11. 11

    How to detect if android application is minimized or not in Android Kotlin

  12. 12

    How to know the sender in KVO?

  13. 13

    How to Chromecast-enable a website?

  14. 14

    How to detect Daylight Saving Time transition in android

  15. 15

    How to addTarget to UIButton without sender

  16. 16

    How to detect programmatically if "Android App" is running in chrome book or in Android phone

  17. 17

    Core Data - detect if the database store was already created or not

  18. 18

    Chromecast Web Sender API:オーディオトラックを切り替える

  19. 19

    How to run android app in all connected devices or emulators at the same time from Android Studio?

  20. 20

    How do I detect fail to connect wifi in android?

  21. 21

    how to detect if the drop down menu is shown above or below the spinner in android?

  22. 22

    How to detect installed Chrome version from my Android App?

  23. 23

    How to detect installed Chrome version from my Android App?

  24. 24

    How to detect screen orientation in a master/detail flow in android

  25. 25

    How to check if MQ is connected

  26. 26

    How are these nested vectors connected?

  27. 27

    How to view that Advertiser is connected

  28. 28

    How do I tweak "sender" in an event?

  29. 29

    How to get the DataGridTextColumn sender's datagrid parent

ホットタグ

アーカイブ