Currently I am successfully able to cast a video to the chrome cast. However when I use the second device and connect to the same device when casting from first device is in progress. It kills cast session on the first device and doesn't connect on the second one.
Is there any way to get the status of the receiver?
This usually happens when I call following on second device.
remoteMediaClient.load(mediaInfo, mediaOptions);
I tried getting the active input state from cast session but it keeps saying ACTIVE_INPUT_STATE_UNKNOWN. There is no way I can get the status even via remoteMediaClient. Any help would be appreciated.
Related
My ionic angularjs corodova app works great when receiving calls from the demo web page on chrome. When I try to initiate a call to the demo site or another device, whether using demo API key or real api key, i get
call_crossing_detected
What does this mean, and how do you fix it?
More details on symptoms. When this occurs, no video comes up and the initiating device shows the error and the call button remains. But the receiving device switches to the hangup button, which then works. And if you speak into either device the receiving device receives the audio, but nothing on the initiating device
"call_crossing_detected" reason appears on hangup event when a call is already established between the two users and you are trying to establish a new one.
So I think you may have an issue on the first call hangup.
I have resolved this issue. It was caused by apiRTC.init executing more than once.
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.
I have an Android app, working with a custom receiver. It was working without problem, but with the release of the new cast companion library, I decided to upgrade it, as well as my Play services version.
Anyway, when I try to connect to Chromecast, my custom receiver HTML page is displayed. But then, I can't connect and send data to it. After a while (something like 15 seconds), the app exits on the Chromecast.
Then, I've tried to get the Cast Hello Text sample to work, using the same app id. Same problem here.
Here is the code I use to launch the Cast app:
Cast.CastApi.launchApplication(mApiClient, getString(R.string.app_id), true)
The result I receive in the ResultCallback, is a status with code 15, with isSuccess method returning false.
The problem doesn't seem to come from my Chromecast, since other users have the exact same issue.
Thanks for your help!
I am currently developing an application that will use Metawear device.
I have noticed that after I connect a device, I can read the live accelerometer values of that device but I want to read/download offline accelerometer values.
For that as per I refer https://gist.github.com/mbientlab/a299fc705f8ac3b64359 , I need to set Trigger.
But when I am setting triggers and if I did not remove that trigger then next time Metawear device unable to detect/scan by my device(Suppose an android mobile).
If device totally discharges and starts again then it resets.
So is there any method to remove that trigger without connecting to the device or reset the device
Thanx in advance
Use the removeAllTriggers method to remove all logging triggers. Line 100 of the aforementioned gist demonstrates trigger removal with the removeTrigger method
http://www.emoticode.net/android-sdk/block-incoming-and-outgoing-phone-calls-programmatically.html
I used above link to get my code working, but I get compilation error saying package "com.XXX...." can not be found.
Googling, I also came across http://quia.cf/orange/pooxy4/nph-poxy.pl/es/20/http/stackoverflow.com/questions/20965702/end-incoming-call-programmatically=3frq=3d1
But I am not clear if a call that is already in progress, can be disconnected programmatically (my goal is to have an app, when opened should disconnect if a call is in progress; doesn't matter if it is outgoing or incoming call)
If so, can some one point me to good working code (I understand java well, but weak on android).