Linked Questions

Popular Questions

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) {
        }

Related Questions