android - Cannot get objectId even inside saveInBackground()? -


i cannot retrieve created object's objectid, inside public void done.

occasion.saveinbackground(new savecallback(){     @override     string string = occasion.getobjectid(); }) 

and returns nulland crashes app nullpointerexception. why null? saved successfully. no object id, why? :(

use

 occassion.saveinbackground(new savecallback() {                             @override             public void done(parseexception e) {                 // todo auto-generated method stub                 if(e==null){                     string string = occasion.getobjectid();                 }             }   }); 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -