¡@

Home 

2014/10/16 ¤W¤È 08:18:03

android Programming Glossary: looper.mylooper

Android: got CalledFromWrongThreadException in onPostExecute() - How could it be?

http://stackoverflow.com/questions/10426120/android-got-calledfromwrongthreadexception-in-onpostexecute-how-could-it-be

Handler created ON Thread.currentThread .getId Log.i Main Looper Looper.getMainLooper .getThread .getId myLooper Looper.myLooper .getThread .getId new AsyncTask Void Void Void @Override protected Void doInBackground Void... params Log.i doInBackground..

How to check if current thread is not main thread [duplicate]

http://stackoverflow.com/questions/11411022/how-to-check-if-current-thread-is-not-main-thread

How to create a Looper thread, then send it a message immediately?

http://stackoverflow.com/questions/4838207/how-to-create-a-looper-thread-then-send-it-a-message-immediately

is implemented roughly as follows gotta love open source public void run Looper.prepare synchronized this mLooper Looper.myLooper notifyAll Looper.loop public Looper getLooper synchronized this while mLooper null try wait catch InterruptedException..

Good way of getting the user's location in Android

http://stackoverflow.com/questions/6181704/good-way-of-getting-the-users-location-in-android

LocationManager.NETWORK_PROVIDER if getLocationQuality bestLocation LocationQuality.GOOD Looper.prepare setLooper Looper.myLooper Define a listener that responds to location updates LocationListener locationListener new LocationListener public void.. receive location updates locationManager.requestLocationUpdates LocationManager.GPS_PROVIDER 1000 1 locationListener Looper.myLooper locationManager.requestLocationUpdates LocationManager.NETWORK_PROVIDER 1000 1 locationListener Looper.myLooper Timer.. Looper.myLooper locationManager.requestLocationUpdates LocationManager.NETWORK_PROVIDER 1000 1 locationListener Looper.myLooper Timer t new Timer t.schedule new TimerTask @Override public void run Looper l getLooper if l null l.quit Log.i LocationCollector..