I'm developing an Android app which supports Chromecast and to do that I'm using a combination of MinimalCastMediaRouteProvider + a custom receiver. All is well with the playback but the Chomecast UX guide has a section headed Cast menu functions appropriately for available receiver devices. It seems to state that when the Chromecast device is already connected to a service it should have a label indicating it, like the following with netflix:
The issue is that on my device all I see is this:
where it's missing the "casting xxx" while I have another device casting to it. Is there something I need to set in my receiver app or is it something in the Android code? I don't see any documentation about it.
You don't need to do anything on your side at this point; there is currently a bug in the preview sdk that doesn't let that to work properly.
Related
I tried really really hard (scanning/trying sample code, reading docs …) but, haven’t been able to figure out how swap out BIND_LISTENER for the new-and-improved CapabilityApi/CapabilityClient scheme.
I recently got a Ticwatch E (from kickstarter) & its running AW 2.0. I came to AW from a Garmin FR-230 & before that, a Pebble smartwatch. I developed similar watchfaces on the Garmin + Pebble platform & one function I included in both, was to vibrate when Bluetooth connectivity breaks (so basically, I don’t leave my mobile phone at home).
I ported my watchface to AW and it works fine w/ BIND_LISTENER in the manifest pointing to my WearableListenerService class - i.e. see logs & pop-up notification. However, I get errors when I try to publish to google playstore `cause BIND_LISTENER is deprecated.
I tried changing the intent-filter to CAPABILITY_CHANGED (I was hoping it was as simple as that). I tried adding onCapabilityChanged() to this WearableListenerService – nothing/no log events.
The links below are to my watchface & the “working” source code on GitHub (w/ BIND_LISTENER). Check-out the manifest + the listener class.
Most of the examples I’ve seen are for activities or for passing data around between wear + mobile – I just want an alert when connectivity changes. A connectivity icon pops up on my watch when BT is gone so, it’s gotta be possible to get an alert.
Newbie Android Wear developer & struggling with the documentation. Appreciate an explicit example, if possible.
https://android-developers.googleblog.com/2016/04/deprecation-of-bindlistener.html
https://play.google.com/store/apps/details?id=com.antonio_asaro.www.marvin_watchface
https://github.com/antonioasaro/Android-Marvin_Watchface
Thanks,
--Antonio
I have a remote playback device that is not a cast-device (let's call him Johnny 5 for now).
From a client app, I want to be able to cast content to a Chromecast or to my Johnny 5 device. The app is based on the Cast SDK v3.
In order to integrate my non-cast device, I built a Media Router Provider and extended the Session & SessionProvider classes. The Session Provider is added in the getAdditionalSessionProviders method of my OptionsProvider class.
I managed to make things work: my device appears in the list of the detected devices with the Chromecast (thanks to the MediaRouterProvider), and when I select it, session is started, and then I can cast contents on it.
However, it seems like the RemoteMediaClient object is Google-cast specific (cannot be used with non-cast devices), like a lot of Cast SDK features (mini controller, expanded controller...).
Question here regards the Cast Dialog, the Remote Control Notification and the Lock Screen: is that possible to use these with my non-cast device ? Or do I have to code the whole bunch to 'mimic' the Cast SDK features ?
Regarding the Cast Dialog, I would like to be able to customize it to have the same behavior as for the Chromecast without coding my own device picker or overriding the default button behavior.
The majority of work would be on your side, coding most everything for non-cast devices. Cast APIs, as you've noticed, do not interact with Sessions that are not CastSessions. So your options is to write an interface that is already implemented by Cast SDK for cast devices and by you for non-cast devices and try to use that common interface as much as possible. Getting things like lock screen amounts to creating a MediaStyle notification; CastSdk handles that for when there is a CastSession involved and you need to create a similar notification when a different type of Session is involved. This is true for almost all UI elements that the Cast SDK provides out of the box.
How can we disconnect a call in Android. I know this has been asked many times. There are many other answers which state that our app needs to be a system app to disconnect a call but then the answer at this link states that it is not so. But, even the answer there does not help to disconnect the call.
Then I saw that SDK 23 adds a new class Call which the Android document says can be used to handle calls. It has a function called disconnect(). So, how can this be used, if our app is not the dialer app? I only need the data to cut/answer the call. (Don't want to become the default dialer app, nor the system app) https://developer.android.com/reference/android/telecom/Call.html#disconnect()
Could I be guided towards what is the latest information in this regard? For both Marshmallow and pre-Marshmallow devices. I feel the solution to both might be different.
Not sure of the solution for pre-Marshmallow, but for M+ I feel the Call class is to be used.
was trying out the CastHelloText-android-master sample in the Google cast sdk.
it seems that I can't get device discovery to work if I change the MediaRouteSelector to look for CastMediaControlIntent.DEFAULT_MEDIA_RECEIVER_APPLICATION_ID. The Cast button didn't appear. but if I change it to CastMediaControlIntent.CATEGORY_CAST, I'm able to get the button to show up.
The reason why I doing this is that I intend to use the default media receiver instead of deploying my own receiver.
I was wondering if there's a bug here. or I should just stick to CATEGORY_CAST for discovery. If you have a way to make it work, pls show me the way, Thanks.
Those two static variables have different purposes. According to the doc http://developer.android.com/reference/com/google/android/gms/cast/CastMediaControlIntent.html:
CATEGORY_CAST - A control category for discovering Cast devices.
DEFAULT_MEDIA_RECEIVER_APPLICATION_ID - The application id for the Cast Default Media Receiver.
So, use CATEGORY_CAST for discovery and use the DEFAULT_MEDIA_RECEIVER_APPLICATION_ID in your launchApplication call.
Is it possible to create an Android application that automatically attend incoming calls to an Android phone? If so, which APIs may be used to achieve this (a piece of code snippet highly appreciable)?
If the programmatic auto attendant feature not possible, why the Android OS imposes this restriction?
Is iOS behaves as same as Android in this scenario, please explain.
While googling I found something that can be useful. I haven't tried yet still I think this will help have a look at Call Control in Android
You can listen incomming call intent by implementing broadcast receiver Intent.CALL_STATE_CHANGED to listen for incoming call, but answering incomming call automatically seems not feasible.coz android application dont have access to incomming call audio stream.