Estimote / Android-Indoor-SDK

Estimote Indoor SDK for Android
MIT License
63 stars 28 forks source link

Exemple not working #3

Closed sebpouteau closed 7 years ago

sebpouteau commented 7 years ago

Hello,

I am sorry to disturb you, but I compile and install your code Exemple on my smartphone, the first page is ok, when click on cloud project, your code failed

08-07 16:21:01.644 7879-7879/com.estimote.indoorapp E/AndroidRuntime: FATAL EXCEPTION: main
                                                                      Process: com.estimote.indoorapp, PID: 7879
                                                                      java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference
                                                                          at android.graphics.Canvas.throwIfCannotDraw(Canvas.java:1224)
                                                                          at android.view.GLES20Canvas.drawBitmap(GLES20Canvas.java:589)
                                                                          at com.estimote.indoorsdk.view.IndoorLocationView.drawBeacons(Unknown Source)
                                                                          at com.estimote.indoorsdk.view.IndoorLocationView.onDraw(Unknown Source)
                                                                          at android.view.View.draw(View.java:15518)
                                                                          at android.view.View.updateDisplayListIfDirty(View.java:14449)
                                                                          at android.view.View.getDisplayList(View.java:14472)
                                                                          at android.view.View.draw(View.java:15239)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:3603)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3397)
                                                                          at android.view.View.updateDisplayListIfDirty(View.java:14444)
                                                                          at android.view.View.getDisplayList(View.java:14472)
                                                                          at android.view.View.draw(View.java:15239)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:3603)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3397)
                                                                          at android.view.View.updateDisplayListIfDirty(View.java:14444)
                                                                          at android.view.View.getDisplayList(View.java:14472)
                                                                          at android.view.View.draw(View.java:15239)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:3603)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3397)
                                                                          at android.view.View.updateDisplayListIfDirty(View.java:14444)
                                                                          at android.view.View.getDisplayList(View.java:14472)
                                                                          at android.view.View.draw(View.java:15239)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:3603)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3397)
                                                                          at android.view.View.updateDisplayListIfDirty(View.java:14444)
                                                                          at android.view.View.getDisplayList(View.java:14472)
                                                                          at android.view.View.draw(View.java:15239)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:3603)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3397)
                                                                          at android.view.View.updateDisplayListIfDirty(View.java:14444)
                                                                          at android.view.View.getDisplayList(View.java:14472)
                                                                          at android.view.View.draw(View.java:15239)
                                                                          at android.view.ViewGroup.drawChild(ViewGroup.java:3603)
                                                                          at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3397)
                                                                          at android.view.View.draw(View.java:15521)
                                                                          at android.widget.FrameLayout.draw(FrameLayout.java:592)
                                                                          at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:2883)
                                                                          at android.view.View.updateDisplayListIfDirty(View.java:14449)
                                                                          at android.view.View.getDisplayList(View.java:14472)
                                                                          at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:266)
                                                                          at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:272)
                                                                          at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:311)
                                                                          at android.view.ViewRootImpl.draw(ViewRootImpl.java:2534)
                                                                          at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2366)
                                                                          at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1994)
                                                                          at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1062)
                                                                          at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5873)
                                                                          at android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
                                                                          at android.view.Choreographer.doCallbacks(Choreographer.java:580)
                                                                          at android.view.Choreographer.doFrame(Choreographer.java:550)
                                                                          at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
                                                                          at android.os.Handler.handleCallback(Handler.java:739)
                                                                          at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                          at android.os.Looper.loop(Looper.java:135)
                                                                          at android.app.ActivityThread.main(ActivityThread.java:5753)
                                                                          at java.lang.reflect.Method.invoke(Native Method)
                                                                          at java.lang.reflect.Method.invoke(Method.java:372)
                                                                          at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
                                                                          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)

Have you any idea for resolve this problem ?

Thanks !

wafel82 commented 7 years ago

Hi, After short investigation - It looks like our SDK have some issues with handling custom colors beacons. Note that our SDK supports Beacons in following colors:

Do your location contains beacons with some custom colors? - if so this might be the root cause.

Regards Wojtek

sebpouteau commented 7 years ago

Hi,

My beacons (estimate location beacons) have a default color :

Can I modify it? Yes how?

Thanks.

wafel82 commented 7 years ago

Hi, It seems that Coconut Puff color caused the problem. Please check out new SDK version we just released compile 'com.estimote:indoorsdk:1.0.1' Let us know if it issue still occurs.

Regards Wojtek