Android的四方:我怎样才能知道是否入住做过或没有? [英] Android foursquare:How can i know that whether check in has done or not?
问题描述
我的工作中,我要整合四方办理入住手续的Android应用程序。我已经做了我的工作,直到场馆的显示。现在,当我选择其中的列表中的位置之一的地方。
I am working on an Android application in which I want to integrate foursquare check-in. I have done my work till display of venues. Now when i select one place among the places in list.
然后我想知道我怎么知道用户是否已经在那个地方成功与否检查。
Then i want to know how I can know whether the user has checked in that place successfully or not.
我用这code。
try {
// Construct data
String data = URLEncoder.encode("ll", "UTF-8") + "=" + URLEncoder.encode(""+lat+" ,"+lon+" ", "UTF-8");
data += "&" + URLEncoder.encode("venueId", "UTF-8") + "=" + URLEncoder.encode(mNearbyList.get(position).id, "UTF-8");
data += "&" + URLEncoder.encode("oauth_token", "UTF-8") + "=" + URLEncoder.encode(mSession.getAccessToken(), "UTF-8");
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
wr.write(data);
wr.flush();
// Get the response
} catch (Exception e) {
e.printStackTrace();
Log.v(TAG,"Exception occur");
}
}
});
请帮助我。我现在应该写检查用户是否已经选中。我真的需要你的帮助。你可以给你的建议非常自由。
Please help me. What should I write now to check whether user has checked in or not. I really need your help. You can give your suggestions very freely.
推荐答案
看起来你正在执行的检查,这样描述的此处 - 你会得到一个签入的对象
It looks like you are performing the checking, so as described here - you will get back a checkin object.
检入对象描述这里(以下在检查结束时,链接/加刚提供的API链接)。 如果您收到签对象,而不是一个错误就意味着检入工作(有一个签入的ID与该对象)
The checkin object is described here (following the link at the end of the checking/add api link just provided). If you get that checkin object and not an error it means the checkin worked (there is a checkin id with that object)
这篇关于Android的四方:我怎样才能知道是否入住做过或没有?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!