2

I am getting crash report error using on my google play console. Here is code where i am getting error. Please help me to sort out the problem

Broadcast of Intent { act=android.intent.action.SCREEN_ON flg=0x50200010 }

try {
            new Timer().scheduleAtFixedRate(new TimerTask() {
                @Override
                public void run() {
                    try {
                        if (bannerList.size() > 0) {
                            if (activity != null) {
                                activity.runOnUiThread(new Runnable() {
                                    public void run() {
                                        try {
                                            int position = bsPromotion.getCurrentSlidePosition() - 1;
                                            if (position < 0 || position > 4) {
                                                position = 0;
                                            }
                                            tvBannerText.setTag(position);
                                            tvBannerText.setText(bannerList.get(position).title);
                                        } catch (Exception e) {
                                        }
                                    }
                                });
                            }

                        }
                    } catch (Exception e) {
                    }

                }
            }, 0, 500);//put here time 1000 milliseconds=1 second
        } catch (Exception e) {
        }
user1159258
  • 81
  • 2
  • 10

2 Answers2

1

You are getting deadObjectException so you have to resolve it.

DeadObjectException - The object you are calling has died, because its hosting process no longer exists.

Solution: Override your service's onDestroy() method and watch what event flow leads to it. If you catch DeadObjectException without going through this method, your service should have been killed by the OS.

As you are using web api in your fragment so sometimes that will sending multiple request on server and in terms of response you are getting @null.

Hemant Parmar
  • 3,924
  • 7
  • 25
  • 49
-1

Test your application using Firebase Test Lab, you can find it's documentation from below link:

Firebase Test Lab

I am sure, it will give possible results of your app crashes and you can find them in your code.

Hope it helps. Thanks.

Muhammad Awais
  • 448
  • 5
  • 17