i have button logs me out of parse if try log out without internet connection app crashes. tried put in try , catch app still crashes if attempt logout without internet connection. why that?
try { log.i("appinfo", "button worked"); parseuser.logout(); intent = new intent(getapplicationcontext(), mainactivity.class); startactivity(i); toast.maketext(getapplicationcontext(), "logged out", toast.length_short).show(); } catch (exception e) { toast.maketext(getapplicationcontext(), "check internet connection", toast.length_long).show(); log.i("appinfo", "catch successful"); e.printstacktrace(); }
Comments
Post a Comment