I'm using a local server on my Android device to cast images + mp4s to Chromecast.
(I tried both - NanoHttpD and AndroidAsyncHttpServer) https://github.com/MikeMitterer/android-cromecastsample/tree/master/src/main/java/at/mikemitterer/mobile/chromecastsample/cast (GH-Repo)) but if I server the files from one of these local servers I get Status{statusCode=unknown status code: 2100, resolution=null}
Serving the files from an external server works - at least with a MP4-File.
This is the the server I'm currently using: https://github.com/MikeMitterer/android-cromecastsample/blob/master/src/main/java/at/mikemitterer/mobile/chromecastsample/cast/CastAsyncFileServer.java
The Activity that initializes everything: https://github.com/MikeMitterer/android-cromecastsample/blob/master/src/main/java/at/mikemitterer/mobile/chromecastsample/ui/MainActivity.java
and my buildMediaInfo-function: https://github.com/MikeMitterer/android-cromecastsample/blob/master/src/main/java/at/mikemitterer/mobile/chromecastsample/ui/MainActivity.java#L317-L341
This shows how the sample app looks like:
Clicking on one of the images triggers the loadRemoteMedia -> buildMediaInfo.
I'm using the Chromecast V1 (old) Device on a 22" Monitor (No Audio with HDMI to DVI Converter) Streaming with other Apps than mine works. Im using the sample-app ID (4F8B3483) for testing.
BTW: (my second problem) If I use my own registered ID Chromecast connects fine but automatically disconnects after approximately 20secs...
I'm a bit lost - please help!
[Update]
Thanks to # Ali Naddaf I re-registered my Application!!! not the device! I changed from "Remote Display Receiver" to "Styled Media Receiver" waited ~15mins turned off/on Chromecast now debugging works and my second problem, that Chromecast automatically disconnected after ~20secs, is also solved. Cool!
If you check my SS you can see that my image is set as background for the video-tag. Is this the way it should work or I am doing something wrong?
Related
I'm trying to run desktop head unit on my pc. I set up everything exactly as this guide specifies: https://developer.android.com/training/cars/testing, (tried both 2.0 and 1.1 with the same result). It appears to connect correctly, but I can't get it do display anything other than "Waiting for phone". Console displays following:
Android Auto - Desktop Head Unit
Build: 2020-09-20-332761970
Version: 2.0-windows-beta
[W]: No configuration specified - using default values.
[E]: Could not load configuration from 'C:\Users\kkowalczyk\.android\headunit.ini'.
BoringSSL is the SSL implementation used in the receiver-lib.
Starting link. Requested protocol version: 1.6 (snapshot 314970161)
[I]: Connecting over ADB to localhost:5277...
[I]: connected.
> Phone reported protocol version 1.6
ssl state=TLS client read_server_hello -1
ssl state=TLS client process_change_cipher_spec -1
ssl state=SSL negotiation finished successfully 1
SSL version=TLSv1.2 Cipher name=ECDHE-RSA-AES128-GCM-SHA256
Verify returned: ok
I'm trying to connect to Pixel 5 (with most recent update), is there anything else I can try?
In my case, I also saw the same issue but resolve by following below steps:
Close the DHU emulator.
In the AA app, stop the HU server. Wait for a couple of seconds, start the HU server.
Stop the HU server again. Wait for a couple of seconds, start the HU server.
Start the DHU emulator.
The OOBE screen shows up on the AA app in phone. Complete the flow. While you are completing the flow, the emulator will be on the 'waiting for phone' screen.
Stop and start the emulator. It will start with the black screen with 'waiting for phone' message but after 2-3 seconds the emulator screen comes up.
Hope it can resolve your issue too.
I ran into the same issue (stuck on the "Waiting for phone..." screen) and was able to fix it by changing Application Mode to Developer on the Developer Settings screen of Android Auto.
Make sure to restart the head unit server on the phone after that in case it was already running, then reconnect/restart desktop-head-unit.
I ran into similar issues initially and for me the issue was that the "Accept terms" screen of the Android Auto App running on the device that is triggered on connecting to the Emulated HUD was not visible and noticed until I scanned through the recent apps in the Task Switcher.
This is mentioned in step 11 of the Test Android apps for cars - DHU setup instructions here
If this is the first time you are connecting the mobile device to the DHU, check the mobile device's screen to accept the terms of service and adjust permission settings as needed.
So just note that this screen may not be immediately visible to you unless you switch the relevant screen from the Task Switcher.
Try to test your phone on a real car to make sure phone actually works with Android Auto. I have two phones (Huawei p20 and Xiaomi Mi10): xiaomi works fine but p20 doesn't work with multiple settings and/or option neither in car or DHU, however both of them are considered as compatible with Android Auto.
I have a sample app that uses Parse Server. I've been testing my app on both emulator and physical devices and I noticed that the response time is much slower on the physical device.
This one is from the emulator.
and this is one is from the physical device:
I've been scratching my head regarding this one. I've also posted it on the parse community platform and followed the advice there to manually monitor the server for every change I've made until I reach my prior server configuration. I overhauled the server from scratch. Do some load testing -> Deployed the server on a replica set -> load testing. Now, I'm in the process of doing some basic queries. I used ADB logcat to see what's happening on both device and saw these errors on the physical device and not on the emulator:
E[N rtchannel]_rt_mqtt_publish_callback(356)=>Failed to publish the request over MQTT. token:be925eea-407c-417d-96c9-3af5a7e83e48, category:mcd-sync-data-task-category, requestId:54138, error:Error Domain=mqtt Code=3008
E[S sync]_createResponseError(166)=>Network Response be925eea-407c-417d-96c9-3af5a7e83e48 contains sync error Error Domain=mqtt Code=3008 - Underlying error (null): Error Domain=mqtt Code=3008
This one also shows before pulling the payload.
W[S sync-state-machine]MCDSyncStateMachineScheduleDelayedRetry(173)=>skipping the new retry with longer delay
W[S sync]_scheduleNextCursorRetry(326)=>skipping delayed retry due to state machine state decision
The number of times these errors pop up is related to the number of queries executed. I did not put any configurations on the server which use MQTT. Any help is much appreciated.
I'm trying to replicate this RaspberryPI example on Android
I created an app for android to advertise a URL using mDNS (jmDNS library), the app works well and I can receive the message on another phone using ZeroConf Browser app
But when I try to receive the same message using Physical Web app nothing happens, the app doesn't find the service.
I believe the problem is in the way I send hostname and txt-records.
This is my code:
serviceInfo = ServiceInfo.create(type,
"www.google.github.io", 80,
"path=/physical-web/");
/*A Key value map that can be advertised with the service*/
serviceInfo.setText(getDeviceDetailsMap());
jmdns.registerService(serviceInfo);
can you help me understand what is wrong?
See these discussions:
https://github.com/openhab/jmdns/issues/25
https://github.com/google/physical-web/issues/414
In short, I think the issue is because the url is in a text record, rather than in the service name, but the Physical Web may change the required format in the future...mdns support is still developing.
Following this tutorial I have successfully created a GLSurfaceView that displays my local video in my Android app. I am using Pristine's gradle build scripts to use native code for webrtc. The web app works as expected in Chrome.
I have established a connection to my nodejs server via web sockets to join a pre-existing conversation. Kurento is being used to deal with rooms. I believe I need to create an SDP Offer to begin sending and receiving videos between peers at this point. (To begin I simply want the video from the Android device to appear on the web interface.)
However if I create a PeerConnection and add my local media stream (created with PeerConnectionFactory.createLocalMediaStream) and then call createOffer() it fails.
The SDPObserver that listens to my connection gets its onCreateFailure called with the message "CreateOffer called with invalid media streams."
Looking at the C code it appears that the streams do not have unique IDs (despite the fact I have only created one stream).
I've been trying to figure this out for a day now and don't seem to be making any progress. Any suggestions?
Thanks in advance!
I am stuck at a place where my Android Phone(Samsung Galaxy) has to open 2(or more) connections to my PC(server) which is a paired device. For this purpose, I start SDP server on PC with UUID : 00001101-0000-1000-8000-00805F9B34FB and channel 2, after the first connection I unregister the SDP service on the PC and register it again on channel 3(and same UUID) and expect my android phone to 'connect' to it for establishing the second bluetooth connection. The second one fails.
The problem as I have figured out is that because of the pairing, the channel num and UUID of the device for the 'BluetoothSocket.connect' are serviced from cache and are not being updated, so my SDP change in channel num on the server side is not visible here as it still tries to connect to channel 2(old one).
A workaround of this problem(found after a lot of frustrating attempts) might be to change the android.server.BluetoothService.java file, by introducing
updateDeviceServiceChannelCache(addr) before returning in the getRemoteServiceChannel() and fetchRemoteUuids() so as to update the channel number at each func call.
The above solution may well be wrong, please pardon me for that. If it is correct please suggest any further changes and how to make this change permanent in eclipse, or in other case(wrong solution), the right way of doing this.
Note: I have android 2.3.5 and the requests from the device are actually from the browser that I forward to the PC. I want them on separate channels.
thanks.