Custom receiver connection failed - android

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!

Related

How to join current cast session? CAF Android Multiple sender app v3

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.

Web RTC - One to One call,no error but, no remote video streaming

Am using Kurento Media server for the one to one call.
In browser the call happens with no issues.
But I want to implement this in android.
Am using this, https://github.com/MaxMaes/WebRTCTest
Since, it is stated, the project is not complete, Am trying to complete this.
Am following all the steps of WebRTC.
Am able to connect to kurento one-one call app, running in server. The flow goes like this
Party A created in browser.
Party B created in android app.
A makes a call to B.
Now, on receiving "incoming call" message, the call is accepted.
pc.createOffer is called.
onCreateSuccess, pc.setLocalDescription is done. sdpoffer is sent to B.
parallelly, receiving "onIceCandidate", pc.addIceCanditate is done.
ICEGatheringState = Complete
A receives the, callResponse, and sends "startcommunication"with sdpAnswer.
pc.setRemoteDescription, from sdpAnswer is done.
onAddStream called. A remote renderer is added to the UI.
But no streaming is coming.
From A, B is receiving "iceCandidate". is anything to be done on this?
In both sides, I dont get the remote video But able to see local video
And I dont get any error.
In onAddRemoteStream change
VideoRendererGui.update(remoteRender, REMOTE_X, REMOTE_Y,   REMOTE_WIDTH,REMOTE_HEIGHT, scalingType)
add one more parameter after scalingType
 VideoRendererGui.update(remoteRender,
 REMOTE_X, REMOTE_Y,   REMOTE_WIDTH,REMOTE_HEIGHT, scalingType,true)
Hope this will help you.
you have it like this?
onAddRemoteStream(MediaStream remoteStream){
remoteStream.videoTracks.get(0).addRenderer(new VideoRenderer(remoteRender));
}
In some case you can not receive video if not sending video.
Workarounded with this: https://stackoverflow.com/a/51883182/571410

aprirtc call_crossing_detected error when calling from android to android

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.

Android Wear: getDataItems returns 0 items

Here is a big problem that i simply don't know whats going on...
I have an app that stores Data in data API. The mobile app is aroudn the play store for some time and I decided to make a app for wearable.
My problem is: when the user install the wearable app for the first time (via Google Play), it need to load the data from the DataApi. But it simple returns 0 itens!
DataItemBuffer dataItems = Wearable.DataApi.getDataItems(mGoogleApiClient).await();
Observations:
GoogleApiClient IS CONNECTED
The Wearable receives the onDataChanged from WearableListenerService and this part is working fine.
I've already tested with .setResultCallback but results still the same.
I have two copmuter for developments, one is one my work and another is on my home.
In my tests, I DELETE the emulator and create a new one, to simulate a "new device beeing connected for the first time".
DataAPI says that the data is synchronzed to all devices but is seems not be working like that. How to solves this? Any workaround? SOMEONE HELP =(
It seems i found the solution for this problem. As I mentioned i have two computers for development, so, 2 development keys.
My mobile app was installed using the "A" computer's key and the wearable was using the "B" one. So, to solve this problem, when start developing always remember to re-run the mobile and wearable app from the same computer to your devices.

Chromecast Receiver URL on Wordpress Site?

I'm trying to get the Sample Media Player App working, and have run into a problem. I have whitelisted my two URLs, and have gotten the app to run on my Android device without any issues.
My problem starts when actually attempting to cast the sample media. My Chromecast correctly displays as an option, however choosing it from the list does not yield any results on the Chromecast, itself (although it appears that my Android device connects without any issues). Could this be caused by my whitelisted URL not ending in ".html"? Here (link removed) is my page, for what it's worth.
Any help would be greatly appreciated.
Please check if the answer in this question (Chrome-cast Sample App doesn't work) can solve your problem.
Basically you need to set AppID in your receiver.html as well.
I think the problem is in MediaRouteHelper.registerMinimalMediaRouteProvider(mCastContext, this);
try to cheak its value, wheter it is returning true or false
if its returning false then it will not run properly

Categories

Resources