1

I am trying to use OData4J to retrieve a list of Users from the StackOverflow OData service (onto an Android 2.1 device), but it isn't working.

public static Enumerable<OEntity> getUserInfo() { 


ODataConsumer c = ODataConsumer.create("https://odata.sqlazurelabs.com/OData.svc/v0.1/rp1uiewita/StackOverflow/"); 


return c.getEntities("Users").execute(); 

I think it is unable to retrieve data from the URL.

Any ideas why this would be? Is there anything wrong with my code?

Thanks.

Emre Yazici
  • 10,136
  • 6
  • 48
  • 55
Techboy
  • 4,286
  • 5
  • 36
  • 45

1 Answers1

0

I found out that it was because I was missing the security in the manifest file:

<uses-permission android:name="android.permission.INTERNET"></uses-permission>

After adding that it now works.

Techboy
  • 4,286
  • 5
  • 36
  • 45