Using Sony Camera API on AndroidWear

℡╲_俬逩灬. 提交于 2019-12-23 02:26:21

问题


I want to create an app that can start and stop recording from a Sony AS100VR camera using camera remote API.

I can get the same working from my nexus using a direct Wifi connection, but when I establish a direct wifi connection from my Sony smartwatch, it fails at the SSDP detection stage.

It's definitely connected to the camera, SSID over Wifi, but it can't detect it.

I have tried playing with retries and timeout values, but I have sort of run out of ideas.

it's falling into the catch catch (InterruptedIOException e) with a java.net.SocketTimeoutException

Any suggestions gratefully appreciated!


回答1:


UDP Mulitcast is not available on smartwatch, so SSDP discovery fails.

There is a fail-safe choice for any UPnP based application, that is:

As in most case, the resource URL structure keeps unchanged except IP Address, so when SSDP discovery failed, let user directly input the IP Address (maybe in form of UI Picker) and get "DeviceDescription.xml" or something else then setup services.




回答2:


Have you taken a look at the CameraRemoteSampleApp that comes with the Camera Remote API SDK? I assume when you say Smartwatch you mean you are using a Sony SmartWatch 3 that supports a direct WiFi connection? If so, you should be able to modify the sample app with minimal changes and run it on the SW3.



来源:https://stackoverflow.com/questions/31764192/using-sony-camera-api-on-androidwear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!