Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

Problem with Android Kitkat (version 4.4.X) #8

Open
UlyssesGomes opened this issue Jun 19, 2017 · 3 comments
Open

Problem with Android Kitkat (version 4.4.X) #8

UlyssesGomes opened this issue Jun 19, 2017 · 3 comments

Comments

@UlyssesGomes
Copy link

UlyssesGomes commented Jun 19, 2017

Hi,

I'm here one more time. But now I'm getting a issue when I try to run the application in android kitkat. The problem happens after connecting with the beacon in the following sequence:

  • Connect the beacon;
  • In Configuration connection, change the URL Frame to EID;
  • set the exponent timer;
  • hit the Configure button;
    After that the Google signin popup appears, when i select the account, the application breaks and the following error is triggered in the console:

FATAL EXCEPTION: android.os.NetworkOnMainThreadException at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1145) at com.android.org.conscrypt.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:683) at okio.Okio$2.read(Okio.java:137) at okio.AsyncTimeout$2.read(AsyncTimeout.java:211) at okio.RealBufferedSource.request(RealBufferedSource.java:71) at okio.RealBufferedSource.require(RealBufferedSource.java:64) at okio.RealBufferedSource.readHexadecimalUnsignedLong(RealBufferedSource.java:270) at com.squareup.okhttp.internal.http.HttpConnection$ChunkedSource.readChunkSize(HttpConnection.java:479) at com.squareup.okhttp.internal.http.HttpConnection$ChunkedSource.read(HttpConnection.java:460) at com.squareup.okhttp.internal.Util.skipAll(Util.java:176) at com.squareup.okhttp.internal.Util.discard(Util.java:158) at com.squareup.okhttp.internal.http.HttpConnection$ChunkedSource.close(HttpConnection.java:499) at okio.RealBufferedSource.close(RealBufferedSource.java:374) at okio.RealBufferedSource.close(RealBufferedSource.java:374) at okio.InflaterSource.close(InflaterSource.java:126) at okio.GzipSource.close(GzipSource.java:182) at okio.RealBufferedSource.close(RealBufferedSource.java:374) at com.squareup.okhttp.internal.Util.closeQuietly(Util.java:90) at com.squareup.okhttp.ResponseBody.bytes(ResponseBody.java:59) at com.squareup.okhttp.ResponseBody.string(ResponseBody.java:83) at br.edu.ufcg.virtus.honeywell.eddystone.update.GoogleSignInDialogFragment$2.onResponse(GoogleSignInDialogFragment.java:197) at br.edu.ufcg.virtus.honeywell.eddystone.util.HttpCallback$2.run(HttpCallback.java:54) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5072) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at dalvik.system.NativeStart.main(Native Method)

The solution for problem "NetworkOnMainThreadException" is using AsyncTask, but where this occurs is already within a AsyncTask (RequestAccessTokenTask at line 181 in class GoogleSignInDialogFragment). This problem never occurs when the app runs in android Nougat.

@roshanrajaratnam
Copy link
Member

@UlyssesGomes sorry about the late reply, I may have missed this issue on my inbox. Are you still having trouble related to this?

@UlyssesGomes
Copy link
Author

The trouble continues, but i'm dont using 4.4.4 anymore, I put the minimum version for android 6.

@roshanrajaratnam
Copy link
Member

roshanrajaratnam commented Aug 8, 2017 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants