bitpay / android-sdk-sample

sample application using the bitpay android sdk
6 stars 8 forks source link

Crashed after tapping Checkout button. #2

Open freefalling opened 9 years ago

freefalling commented 9 years ago

Tested in two different devices with Jelly Bean 4.3. It say's "Unfortunately, MusicStore has stopped".

ionux commented 9 years ago

Can you open the Android Device Monitor while your test device is attached, run the app and copy/paste the log output? That might shed some more light on the problem.

richard-muvirimi commented 7 years ago

@ionux this is caused by getApplicationContext() used here instead of CartActivity.this as descibed here

here's the logcat 08-21 17:51:52.877 20748-20748/com.bitpay.sample.musicstore E/AndroidRuntime: FATAL EXCEPTION: main Process: com.bitpay.sample.musicstore, PID: 20748 android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application at android.view.ViewRootImpl.setView(ViewRootImpl.java:683) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:342) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94) at android.app.Dialog.show(Dialog.java:329) at com.bitpay.sample.musicstore.CartActivity$1$1.onError(CartActivity.java:80) at com.bitpay.sdk.android.BitPayAndroid$1$1.onPostExecute(BitPayAndroid.java:87) at com.bitpay.sdk.android.BitPayAndroid$1$1.onPostExecute(BitPayAndroid.java:83) at android.os.AsyncTask.finish(AsyncTask.java:667) at android.os.AsyncTask.-wrap1(AsyncTask.java) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:684) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6186) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

ionux commented 7 years ago

Hey @tygalive sorry for the delay getting back to you. I've not been at BitPay for a while now and so have not been managing their code libraries & plugins like before. The person who could probably help you with this is @pieterpoorthuis or @ajp8164 . Best of luck to you and @freefalling with your Android projects!

richard-muvirimi commented 7 years ago

Ok thank you @ionux