nisrulz / easydeviceinfo

:iphone: [Android Library] Get device information in a super easy way.
Apache License 2.0
1.76k stars 228 forks source link

Can't create handler inside thread that has not called Looper.prepare() #22

Closed DimaDDM closed 6 years ago

DimaDDM commented 7 years ago

In method public final String getUA()

nisrulz commented 7 years ago

Please call getUA() from the UI thread only. [Wiki Link]

Call like below

runOnUiThread (new Thread(new Runnable() { 
         public void run() {
             String ua = easyIdMod.getUA();
         }
     }));
nisrulz commented 6 years ago

Closing this issue for now. Reopen if this still persists.