2

I'm developing an android app on A6300 camera. I want to realize "Transferring images " function. I connected the camera wifi and found the device. When I get the device info by accessing the url http://192.168.122.1:61000/scalarwebapi_dd.xml.

The information of Camera Remote API is described by the tags"X_ScalarWebAPI_DeviceInfo" element in the picture. I can't get the "avContent" service described on the Development Guide. I can just get "accessControl" service. I have updated the camera fireware to 2.00, but that doesn't matter.

the device info xml

halfer
  • 19,824
  • 17
  • 99
  • 186
Jack Wu
  • 21
  • 1
  • Please read [Under what circumstances may I add “urgent” or other similar phrases to my question, in order to obtain faster answers?](//meta.stackoverflow.com/q/326569) - the summary is that this is not an ideal way to address volunteers, and is probably counterproductive to obtaining answers. Please refrain from adding this to your questions. – halfer Aug 17 '17 at 14:08
  • @Jack Wu -- how did you solve the issue ? Did updating the firmware help ? – aviimaging Nov 14 '19 at 23:16
  • I had the same issue with my DSC-RX100M4. Installing the last version of the the remote control app (4.31) on the camera solved the problem for me. https://www.playmemoriescameraapps.com/portal/usbdetail.php?eid=IS9104-NPIA09014_00-F00002 – DrPepperJo Oct 24 '21 at 19:58

1 Answers1

0

You actually have the first step required to start using the Camera API. You now need to parse the above xml to grab the correct ActionList_URL. The one you need is the one with the ServiceType of "camera". That means that you will be receive the url "http://192.168.122.1:8080/sony". Now what you need to do is run a POST call to this url providing the body for the API endPoint you want to call.

If you want to take a new picture you can call the actTakePicture Endpoint passing JSON like this

{
"method": "actTakePicture",
"params": [],
"id": 1,
"version": "1.0"
}

You will then get back a result like this:

{
"result": [
["http://ip:port/postview/postview.jpg"]
],
"id": 1
}

As you can see the url to the image is returned and now you can download it. How you download it will depend on the programming language you are using. Here is a link to how to download an image from a url using Android: Best method to download image from url in Android

If you want to see all of the images and video on the camera and download them you would use the getContentList API call

{
"method": "getContentList",
"params": [
{
   "uri": "storage:memoryCard1",
   "stIdx": 0,
   "cnt": 50,
   "view": "date",
   "sort": ""
}
],
   "id": 1,
   "version": "1.3"
}

This will give you a result something like this:

{

"result": [
[
{
"uri": "image:content?contentId=XXXXXXXXXX",
"title": "",
"content": {
"original": [
{
"fileName": "DSC00001.JPG",
"stillObject": "jpeg",
"url": "http://ip:port/contentstransfer/orgjpeg/xxxxxxxx-xxxxxxxx"
}
],
"smallUrl": "http://ip:port/contentstransfer/vga/xxxxxxxx-xxxxxxxx",
"largeUrl": "http://ip:port/contentstransfer/scn/xxxxxxxx-xxxxxxxx",
"thumbnailUrl": "http://ip:port/contentstransfer/thumb/xxxxxxxx-xxxxxxxx"
},
"createdTime": "2014-08-18T12:34:56+09:00",
"contentKind": "still",
"folderNo": "100",
"fileNo": "0001",
"isPlayable": "false",
"isBrowsable": "false",
"isProtected": "",
"remotePlayType": null
}
]
],
"id": 1
}

Please let me know if you need more information

pg316
  • 1,380
  • 1
  • 8
  • 7
  • Can you please explain how your answer helps the OP's concern with not being able to get the 'avContent service' on the sony A6300 ? Isn't the 'avContent' service required to download the list of content and access the url for required images, raw, jpeg, etc. – aviimaging Nov 14 '19 at 23:14
  • I get the URLs - e.g. http://192.168.122.1:8080/contentstransfer/orgjpeg/index%3A%2F%2F1000%2F00000001-default%2F00000001-00000925_1_1_1000 - but then when I try to get I'm getting 500. Anyone else run into this problem before? – Inez May 28 '22 at 17:33