Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

oData SDK Android - download media link via /$value

$
0
0

Hello,

   I am creating the native Android app that is using oData and connects to NW Gateway or SMP 3.0 for data provisioning. Following how-to guides for android from Claudia Pacheco  I managed well along the way to connect to SMP, get some entities back and parse data.

   However one of my requirements is to download the binary attachment that are modeled as mediaLink in NW gateway and are accessible over urls like Document('ID00001')/$value

 

When I try to put a code like one below system fails with message that I have wrong conversation

 

  1. OnlineODataStore store = openListener.getStore(); 
  2. ODataResponseSingle resp = store.executeReadEntity("Document('ID00001')/$value", null); 

When I look at logs in SMP server or testing the URL in Gateway I see that file content is sent to mobile device and apparently it fails at parsing it inside ODataResponseSingle handler also, when I test the same URL from browser pointing directly to NW Gateway I can get the file downloaded without any problems.


Can someone point me in right direction on how to download media content properly to mobile devices as I am a bit stuck there at the moment?


Best regards, Artem


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>