Created
August 12, 2015 16:17
-
-
Save sax1johno/a7319b2b672248427438 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MyActivity extends Activity { | |
Handler mHandler; // These are used to manage multiple threads in Android. | |
..... | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
mHandler = new Handler(); | |
mHandler.post(new Runnable() { | |
@Override | |
public void run() { | |
// Do all of your network / facebook stuff in here | |
// but make sure that the facebook stuff has finished executing before | |
// trying to use it. | |
} | |
} | |
} | |
..... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment