java - Android querying data from azure mobile services -


i fine inserting data azure mobile services, having trouble querying data once input it.

this how inserting data azure mobile services , works fine:

public class register extends activity implements onclicklistener{ @override     protected void oncreate(bundle savedinstancestate) {                     success = json.getint(tag_success);                 if (success == 1 && password.equals(con)) {                     log.d("user created!", json.tostring());                         // save new user data parse.com data storage                         parseuser user = new parseuser();                         user.setusername(username);                         user.setpassword(password);                         user.setemail(email);                         final item myitem = new item();                         myitem.id = username;                         myitem.text = "test program";                         myitem.complete = false;                         final mobileservicetable<item> mtodotable = mclient.gettable(item.class);                          new asynctask<void, void, void>() {                                  @override                                 protected void doinbackground(void... params) {                                     try {                                         mtodotable.insert(myitem).get();                                         } catch (exception exception) {                                      }                                     return null;                                 }                             }.execute(); 

this attempt querying data not work log prints "not working" each time

public class loginsignupactivity extends activity { public void oncreate(bundle savedinstancestate) {     new asynctask<void, void, void>() {                 @override                 protected void doinbackground(void... params) {                     try {                      mobileservicetable<todoitem> mtodotable = mclient.gettable("item", todoitem.class);                         final mobileservicelist<todoitem> result =                             mtodotable.where().field("id").eq("myemail@domain.com").execute().get();                         (todoitem mtodo : result) {                             log.d("yes", "working");                         }                     } catch (exception exception) {                      log.d("not", "working");                     }                     return null;                 }             }.execute(); 


Comments

Popular posts from this blog

c++ - llvm function pass ReplaceInstWithInst malloc -

Cross-Compiling Linux Kernel for Raspberry Pi - ${CCPREFIX}gcc -v does not work -

java.lang.NoClassDefFoundError When Creating New Android Project -