小编Max*_*nto的帖子

Rxjava和Volley请求

我的问题应该听起来像傻瓜,但我只是从Asynktask跳到RxJava.所以:

可以使用RxJava Observable和Volley Requests吗?这意味着,使用未来的请求.

我问这个问题,因为像改造这样的另一个httpClient 使用RxJava非常好,但是个人喜欢Volley,所以它可能吗?

编辑

基于第一个答案,我知道这是可能的.

你能分享一些展示如何做到这一点的样本吗?

android android-volley rx-java

21
推荐指数
2
解决办法
9815
查看次数

如何检查配对的蓝牙设备是打印机还是扫描仪 (Android)

我希望能帮到我,我正在开发一个 Android 应用程序,需要连接蓝牙设备,如扫描仪和打印机,目前我可以列出所有配对设备,但我想知道配对设备是否是打印机、扫描仪、移动设备, 等等。

有什么方法可以知道配对的蓝牙设备的种类吗?

java android bluetooth

4
推荐指数
3
解决办法
7718
查看次数

Volley:如何使用承载访问令牌身份验证发送JSONObject

下午,

我有以下代码:

{
  "criteriaelement": 
 [ 
 { 
   "Value1" : "03",
   "FieldName" : "InventLocationId",
   "Operator" : 0,
  "DataSourceName" : "SalesTable"

   } 
  ]
}


public  JSONObject crear_json_object(){

     JSONObject param= new JSONObject();
     JSONArray criteria_e= new JSONArray();
     JSONObject param_obj= new JSONObject();

     //agregamos los parametros al JSONOBJECT
     try{
         param_obj.put("Value1","03");
         param_obj.put("Operator",0);
         param_obj.put("DataSourceName","SalesTable");
         param_obj.put("FieldName","InventLocationId");


         criteria_e.put(param_obj);   
         param.put("criteriaelement", criteria_e);
         msgResponse.setText(param.toString());

     }catch(Exception e){}      
    return param;

}

private void get_sales_orders() {

    //para enviar objetos json en lugar de null se deben enviar...
    JsonObjectRequest jsonObjReq = new JsonObjectRequest(Method.POST,
            Const.ws_Salesorders, crear_json_object(),
            new Response.Listener<JSONObject>() { …
Run Code Online (Sandbox Code Playgroud)

android

3
推荐指数
1
解决办法
5301
查看次数

如何更新/插入/删除CrossCompany

是否可以在axapta中插入,更新或删除crossCompany?

我想这样做,在我的查询调试我有这个:

select forUpdate crossCompany tlRemoteLocationInfo
                where tlRemoteLocationInfo.RemoteLocationId == "someId";
if (tlRemoteLocationInfo.RecId)
{
   ttsBegin;
   changeCompany(tlRemoteLocationInfo.dataAreaId)
   //then i make mi update to fields and then i make this:
   tlRemoteLocationInfo.update();
   ttsCommit;
}
Run Code Online (Sandbox Code Playgroud)

我有一个try catch,并且调试,无法在方法tlRemoteLocationInfo.update()中更新,例外是:

$ exception {"Se produjounaexppcióndetipo'Microsoft.Dynamics.Ax.Xpp.ErrorException'."} System.Exception {Microsoft.Dynamics.Ax.Xpp.ErrorException}

我错过了什么?

x++ axapta dynamics-ax-2012-r2

1
推荐指数
1
解决办法
1226
查看次数