0

Hey everyone I'm trying to use a geocoder inside my secondary thread to stop skipping frames but the log still says that It's skipping 300 frames. Any help is appreciated.

jobList.setOnItemClickListener(new AdapterView.OnItemClickListener() {

@Override

public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                        String itemInfo = parent.getItemAtPosition(position).toString();
                        Runnable runnable = new Runnable() {
                            @Override
                            public void run() {
                                Intent intent = new Intent(SeeJobs2.this, Map.class);
                                String[] yes0 = itemInfo.split(" Job Id. ", 2);
                                String hi0 = yes0[1].toString();
                                String[] yes = itemInfo.split(" Job Address. ", 2);
                                String hi = yes[1].toString();
                                String[] yesTwo = hi.split(". Payment Amount. ", 2);
                                String hiTwo = yesTwo[0].toString();
                                try {
                                    List<Address> addresses = jobGeo.getFromLocationName(hiTwo, 1);
                                    Address address = addresses.get(0);
                                    String[] yesThree = itemInfo.split(". User Id. ", 2);
                                    String hiThree = yesThree[1].toString();
                                    String[] yesFour = hiThree.split(" . ", 2);
                                    String hiFour = yesFour[0].toString();
                                    intent.putExtra("clickInfo", address);
                                    intent.putExtra("HiHi", hi0);
                                    startActivity(intent);
                                } catch (IOException e) {
                                    e.printStackTrace();
                                }
                            }
                        };
                        Thread thread = new Thread(runnable);
                        thread.start();
                            }
                        });
Conm44
  • 1
  • 1
  • Check [this](https://stackoverflow.com/questions/14678593/the-application-may-be-doing-too-much-work-on-its-main-thread) – Zain Jul 10 '21 at 01:00
  • 3
    Does this answer your question? [The application may be doing too much work on its main thread](https://stackoverflow.com/questions/14678593/the-application-may-be-doing-too-much-work-on-its-main-thread) – Ananta Raha Jul 10 '21 at 04:58

0 Answers0