use of com.juns.wechat.bean.User in project wechat by motianhuo.
the class MyCodeActivity method initData.
@Override
protected void initData() {
String id = Utils.getValue(this, Constants.User_ID);
tv_accout.setText("微信号:" + id);
User user = GloableParams.Users.get(id);
if (user != null && !TextUtils.isEmpty(user.getUserName()))
tvname.setText(user.getUserName());
Bitmap qrcode = generateQRCode("JUNS_WeChat@User:" + id);
ImageView imageView = (ImageView) findViewById(R.id.img_code);
imageView.setImageBitmap(qrcode);
}
use of com.juns.wechat.bean.User in project wechat by motianhuo.
the class UpdateService method initUserList.
// 获取好友列表和订阅号
private void initUserList() {
GloableParams.UserInfos = db.findAll(User.class);
netClient.post(Constants.getUserInfoURL, null, new BaseJsonRes() {
@Override
public void onMySuccess(String data) {
List<User> new_users = JSON.parseArray(data, User.class);
for (User user : new_users) {
if (user.getUserName() == null) {
user.setUserName("WX" + user.getTelephone());
new_users.remove(user);
new_users.add(user);
}
if (db.findById(user.getId(), User.class) != null)
db.deleteById(User.class, user.getId());
db.save(user);
GloableParams.Users.put(user.getTelephone(), user);
}
sendBrodcast("UserList");
}
@Override
public void onMyFailure() {
// initUserList();
}
});
}
use of com.juns.wechat.bean.User in project wechat by motianhuo.
the class AddFromContactActivity method initView.
@Override
protected void initView() {
getLoadingDialog("正在获取联系人").show();
String str_contact = Utils.getValue(this, Constants.ContactMsg);
RequestParams params = new RequestParams();
params.put("userlist", str_contact);
netClient.post(Constants.getContactFriendURL, params, new BaseJsonRes() {
@Override
public void onMySuccess(String data) {
List<User> UserInfos = JSON.parseArray(data, User.class);
mlistview.setAdapter(new FromContactAdapter(AddFromContactActivity.this, UserInfos));
getLoadingDialog("正在获取联系人").dismiss();
}
@Override
public void onMyFailure() {
// TODO Auto-generated method stub
getLoadingDialog("正在获取联系人").dismiss();
}
});
}
Aggregations