如何检查URL中两个字段的值?

时间:2014-12-02 04:46:57

标签: java android json string

大家好我有一个我的网址是通过id连接的, 这里我使用的是user_login_id,响应看起来像这样..

    {"interestreceived":[{"received_detail_id":2783,"interest_id":1288,"name":"Monali Patel","profile_id":"GM453843",
     "image":"","cast":"Not Willing to specify","age":"24","location":"","user_status":"Accept"}]}

我在上面的JSON中收到了_detail_id,

现在在我的下一个JSON响应中

这里我使用两个ID,在我的代码中我使用put extra并获得额外的值来传递值

String matchId=this.getIntent().getStringExtra("received_detail_id");  
String Id=this.getIntent().getStringExtra("user_login_id");

USER URL:

USER_URL="http://mywebsitename.com/webservice/interestreceiveddetail?version=apps&received_detail_id="+matchId+"&user_login_id="+Id;

这是正确的方法吗?因为我没有得到输出

1 个答案:

答案 0 :(得分:0)

检查一下它会给你如何使用putextra和getextra How to use putExtra() and getExtra() for string data