Work with facebook on Android. Sometimes my application gives money in real time when I tried to allow Facebook in Android.not in the emulator. I used the Android Facebook SDK. So I thought threads could stop this. At first I tried asintasku
Activity act=this; private class fbwork extends AsyncTask<Facebook, Integer, String> { @Override protected String doInBackground(Facebook... para) {
call code:
new fbwork().execute(facebook);
create error: cannot create handler inside thread that did not call Looper.Prepare ()
So, I tried the usual sequence of threads.
public void loginprocesure() throws MalformedURLException, IOException { final Activity ac=this; if(loginflag==0) { new Thread(new Runnable() { public void run() {
Again the same result. any way to fix this !!!! How to stop this application crash on a real device. Please, help.
source share