android - StartActivity wont work from onclick event -
i'm trying log in facebook , pass user's info activity problem when run startactivity method intent onclick event gets freeze's , doesn't anything
i created class implements serializable holds couple of strings
then when user log in facebook create instance of class can pass on other activity
heres code:
session.openactivesession(me, true, new statuscallback() { @override public void call(session session, sessionstate state, exception exception) { if(session.isopened()) { request.executemerequestasync(session, new request.graphusercallback() { @override public void oncompleted(graphuser user, response response) { if(user!=null) { graphlocation location= user.getlocation(); string address = location.getstreet()+","+location.getcity()+","+location.getstate()+","+location.getcountry(); b.setvisibility(view.visible); fuser = new fbuser( user.getname(), user.getfirstname(), user.getlastname(), user.getbirthday(), user.getid(), user.getinnerjsonobject(), user.getlink(), address, user.getusername()); } } }); } } });
as can see set button visible , when user clicks button start activity , pass user object:
b.setonclicklistener(new onclicklistener() { @override public void onclick(view v) { final login log = (login) me; final fbuser user = fuser; final intent = new intent(getbasecontext(),profile.class); i.putextra("user", user); try { log.startactivity(i); } catch (exception e) { e.getmessage(); } } }); }
but nothing happends button freeze's , nothing happends.
any ideas why happend?
Comments
Post a Comment