Java Code Examples for cn.bmob.v3.BmobQuery#getObject()
The following examples show how to use
cn.bmob.v3.BmobQuery#getObject() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Update.java From styT with Apache License 2.0 | 6 votes |
private void xft() { BmobQuery<i_a> query = new BmobQuery<>(); query.getObject("03bf357e85", new QueryListener<i_a>() { @Override public void done(i_a movie, BmobException e) { if (e == null) { String s = movie.getContent(); String sr = nico.styTool.Constant.a_mi + "\n" + nico.styTool.Constant.a_miui; if (s.equals(sr)) { } else { nico.styTool.ToastUtil.show(Update.this, "版本不一致,请更新", Toast.LENGTH_SHORT); finish(); } } else { } } }); }
Example 2
Source File: PublishActivity.java From styT with Apache License 2.0 | 6 votes |
private void xft() { BmobQuery<i_a> query = new BmobQuery<>(); query.getObject("03bf357e85", new QueryListener<i_a>() { @Override public void done(i_a movie, BmobException e) { if (e == null) { String s = movie.getContent(); String sr = nico.styTool.Constant.a_mi + "\n" + nico.styTool.Constant.a_miui; if (s.equals(sr)) { } else { nico.styTool.ToastUtil.show(PublishActivity.this, "版本不一致,请更新", Toast.LENGTH_SHORT); finish(); } } else { finish(); } } }); }
Example 3
Source File: Main4Activity.java From styT with Apache License 2.0 | 6 votes |
private void xft() { BmobQuery<i_a> query = new BmobQuery<>(); query.getObject("03bf357e85", new QueryListener<i_a>() { @Override public void done(i_a movie, BmobException e) { if (e == null) { String s = movie.getContent(); String sr = nico.styTool.Constant.a_mi + "\n" + nico.styTool.Constant.a_miui; if (s.equals(sr)) { } else { nico.styTool.ToastUtil.show(Main4Activity.this, "版本不一致,请更新", Toast.LENGTH_SHORT); finish(); } } else { } } }); }
Example 4
Source File: lua_web.java From stynico with MIT License | 6 votes |
/** * 初始化网路数据: */ private void initWebView() { BmobQuery<o> query = new BmobQuery<o>(); query.getObject(lua_web.this, "957aaf7e08", new GetListener<o>() { @Override public void onSuccess(o object) { wv_web.loadUrl(object.getContent()); wv_web.setWebViewClient(new MyWebViewClient()); wv_web.setDownloadListener(new MyDownLoadListener()); } @Override public void onFailure(int code, String msg) { } });}
Example 5
Source File: DetailActivity.java From AndroidReview with GNU General Public License v3.0 | 6 votes |
private void loadDataByNet() { BmobQuery<Content> query = new BmobQuery<>(); query.getObject(DetailActivity.this, mContent.getObjectId(), new GetListener<Content>() { @Override public void onSuccess(Content content) { setData(content); //把数据缓存到本地 SaveCacheAsyncTask savecaheTask = new SaveCacheAsyncTask(DetailActivity.this, content, CacheHelper.CONTENT_CACHE_KEY + mContent.getObjectId()); savecaheTask.execute(); mLoadingLayout.setLoadingLayout(LoadingLayout.HIDE_LAYOUT); mScrollViewEx.setVisibility(View.VISIBLE); } @Override public void onFailure(int i, String s) { if (mLoadingLayout.getState() == LoadingLayout.STATE_REFRESH) { mLoadingLayout.setLoadingLayout(LoadingLayout.NETWORK_ERROR); } } }); }
Example 6
Source File: BmobCourseDataSource.java From ZfsoftCampusAssit with Apache License 2.0 | 6 votes |
@Override public void getLocalTimetableCourse(String timeCourseId, final LoadCourseCallback callback) { BmobQuery<Course> singleCourseQuery = new BmobQuery<>(); singleCourseQuery.addWhereContains( CoursePersistenceContract.CourseTimetableEntry.COLUMN_NAME_TIME_ID,timeCourseId); singleCourseQuery.getObject(mContext, timeCourseId, new GetListener<Course>() { @Override public void onSuccess(Course course) { callback.onCourseLoaded(course); } @Override public void onFailure(int i, String s) { callback.onDataError(); } }); }
Example 7
Source File: l.java From stynico with MIT License | 5 votes |
private void r() { BmobQuery<o> query = new BmobQuery<o>(); query.getObject(this, "b8e2da92f1", new GetListener<o>() { @Override public void onSuccess(o object) { String s=object.getContent(); String sr="fi"; if (s.equals(sr)) { Toast.makeText(getApplicationContext(), "请更新到新版", Toast.LENGTH_SHORT).show(); finish(); } else { }} // .setCancelable(false). @Override public void onFailure(int code, String msg) { // finish(); } }); }
Example 8
Source File: WeiboListActivity.java From stynico with MIT License | 5 votes |
private void xft() { BmobQuery<i_a> query = new BmobQuery<i_a>(); query.getObject(WeiboListActivity.this, "03bf357e85", new GetListener<i_a>() { @Override public void onSuccess(i_a object) { String s = object.getContent(); String sr = nico.styTool.Constant.a_mi + "\n" + nico.styTool.Constant.a_miui; if (s.equals(sr)) { } else { nico.styTool.ToastUtil.show(WeiboListActivity.this, "版本不一致,请更新", Toast.LENGTH_SHORT); finish(); } } // .setCancelable(false). @Override public void onFailure(int code, String msg) { } }); }
Example 9
Source File: OrderActivity.java From BitkyShop with MIT License | 5 votes |
private void initRecyclerOrderData(List<CommodityOrder> commodityOrders) { //用于从服务器请求得到的商品信息 commodities = new ArrayList<>(); //用于提交到服务器中的订单中的商品信息 commodityOrderSubmitList = new ArrayList<>(); for (final CommodityOrder commodityOrder : commodityOrders) { BmobQuery<Commodity> bmobQuery = new BmobQuery<>(); bmobQuery.getObject(commodityOrder.getObjectId(), new QueryListener<Commodity>() { @Override public void done(Commodity commodity, BmobException e) { if (e != null) { KLog.d("有异常:" + e.getMessage()); return; } if (commodity.getCount() <= 0 && currentStatus == KySet.CART_REQUEST_SUBMIT_ORDER) { return; } KLog.d("读取成功,objectId:" + commodity.getObjectId() + "," + commodity.getName()); commodity.setCount(commodityOrder.getCount()); commodities.add(commodity); commodityOrderSubmitList.add(commodityOrder); recyclerAdapter.reloadData(commodities); countTotalPrices(); } }); } }
Example 10
Source File: UserProfileActivity.java From stynico with MIT License | 4 votes |
private void initView() { toolbar = (android.support.v7.widget.Toolbar) findViewById(R.id.toolbar); // 初始化Toolbar控件 setSupportActionBar(toolbar); // 用Toolbar取代ActionBar //toolbar.setTitleTextColor(getResources().getColor(R.color.text_font_white));//标题颜色 // toolbar.setSubtitleTextColor(getResources().getColor(R.color.text_font_white));//副标题颜色 username = (RelativeLayout) findViewById(R.id.lxw_user_profile_username); usernameText = (TextView) findViewById(R.id.lxw_id_user_profile_username_text); email = (TextView) findViewById(R.id.lxw_id_user_profile_email); Img = (RelativeLayout) findViewById(R.id.lxw_user_profile_img); userImg = (ImageView) findViewById(R.id.lxw_id_user_profile_userimg); sex = (RelativeLayout) findViewById(R.id.lxw_user_profile_sex); personality = (RelativeLayout) findViewById(R.id.lxw_user_profile_personality); personalityText = (TextView) findViewById(R.id.lxw_user_profile_personality_text); a = (TextView) findViewById(R.id.lxwuserprofileTextView1); btn = (Button) findViewById(R.id.lxw_user_profile_btn_save); BmobQuery<MyUser> query = new BmobQuery<MyUser>(); query.getObject(this, myUser.getObjectId(), new GetListener<MyUser>() { @Override public void onSuccess(MyUser object) { TextView sexText = (TextView) findViewById(R.id.lxw_id_user_profile_sex_text); Integer ios = object.getSex(); sexText.setText(Integer.toString(ios)); if (object.getAddress().equals("激活")) { CheckBox cb = (CheckBox) findViewById(R.id.lxwuserprofileCheckBox2); cb.setChecked(true);//选中 } else { } String s="" + object.getEmailVerified(); String sr="true"; if (s.equals(sr)) { CheckBox b = (CheckBox) findViewById(R.id.lxwuserprofileCheckBox1); b.setChecked(true);//选中 } else { //Toast.makeText(WeiboListActivity.this, "未激活帐号最多(68字)", Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(int code, String msg) { // TODO Auto-generated method stub } }); }