2

I am developing a native android app on MobileFirst platform. Does MobileFirst provide any code to connect to a web service instead of going through adapters? This is basically only for Native Android development and not for Hybrid app.

Andrew Ferrier
  • 16,664
  • 13
  • 47
  • 76
Rahul
  • 217
  • 1
  • 9

3 Answers3

1

The MobileFirst SDK only provides what is required to work with features provided by MobileFirst, such as connecting to various backends using Adapters with the added benefit of the MobileFirst security framework, and other features.

If you have a need to connect to backends not via MobileFirst, use other common client-side utilities to achieve that.

Andrew Ferrier
  • 16,664
  • 13
  • 47
  • 76
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
1

I used the following code and it worked.

WLResourceRequest request = new WLResourceRequest("Actual server path here", GET); request.addHeader(new BasicHeader("IfAnyHeader", "here")); request.send(new ResponseListener());

Rahul
  • 217
  • 1
  • 9
0

If you are using native Android, you could use volley (or similar) to call external web services or REST apis.

http://developer.android.com/training/volley/index.html

Nothing to do with MobileFirst though, all totally standard Android native coding.