Open UlyssesGomes opened 7 years ago
@UlyssesGomes sorry about the late reply, I may have missed this issue on my inbox. Are you still having trouble related to this?
The trouble continues, but i'm dont using 4.4.4 anymore, I put the minimum version for android 6.
I will try to find sometime tomorrow to debug this to see what's wrong here.
On Aug 8, 2017 19:58, "UlyssesGomes" notifications@github.com wrote:
The trouble continues, but i'm dont using 4.4.4 anymore, I put the minimum version for android 6.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NordicSemiconductor/Android-nRF-Beacon-for-Eddystone/issues/8#issuecomment-321033861, or mute the thread https://github.com/notifications/unsubscribe-auth/AISvDXsAxYhTD5bqDpph05CFJP7VHnQAks5sWKHOgaJpZM4N-SX_ .
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:
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.