Does Mobilefirst provide a provision to access web

2019-07-10 15:59发布

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.

3条回答
beautiful°
2楼-- · 2019-07-10 16:38

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());

查看更多
淡お忘
3楼-- · 2019-07-10 16:41

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.

查看更多
迷人小祖宗
4楼-- · 2019-07-10 16:47

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.

查看更多
登录 后发表回答