Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7567217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:36:36+00:00 2026-05-30T14:36:36+00:00

I need a help more.Actually i am facing a problem for my listview that

  • 0

I need a help more.Actually i am facing a problem for my listview that is getting new data after each 3 seconds as i asked you was working fine now.but there is a problem when i click on the listrow (launch the new activity show the visitordetail page) i am passing some data from listview row to another activity.my problem is that listview is getting new data after each 3 seconds when i click the listrow then next activity started and show the visitordetail page in the case update method is called before clicking the listview row but if i click the row and same time new data is received and added to row that app is crashed.

what should i do that my app is not crashed and work fine when click on row or row’s button.i passing sessiontext and iptext related to that row to next activity.

my class code is following the link given below.
http://www.coderanch.com/t/568877/Android/Mobile/android-custom-list-view-position#2585198
eranch.com/t/568803/Android/Mobile/start-new-activity-when-click

one thing i more want with my app when i click on listiview row update list method is stopped and new activity is started and when i come back by from new activity the update method is again started how can this possible?

when i am coming back to next activty my logcat is like the following………….

02-29 12:53:53.463: E/AndroidRuntime(5066): FATAL EXCEPTION: main
02-29 12:53:53.463: E/AndroidRuntime(5066): java.lang.RuntimeException: Unable to resume activity {com.live2support/com.live2support.L2STest}: java.lang.IllegalStateException: Timer was cancelled
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3128)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3143)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2059)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.os.Handler.dispatchMessage(Handler.java:99)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.os.Looper.loop(Looper.java:123)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.ActivityThread.main(ActivityThread.java:4627)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at java.lang.reflect.Method.invokeNative(Native Method)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at java.lang.reflect.Method.invoke(Method.java:521)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at dalvik.system.NativeStart.main(Native Method)
02-29 12:53:53.463: E/AndroidRuntime(5066): Caused by: java.lang.IllegalStateException: Timer was cancelled
02-29 12:53:53.463: E/AndroidRuntime(5066):     at java.util.Timer.scheduleImpl(Timer.java:566)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at java.util.Timer.schedule(Timer.java:485)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at com.live2support.BaseActivity.onStart(BaseActivity.java:157)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at com.live2support.BaseActivity.onRestart(BaseActivity.java:932)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.Instrumentation.callActivityOnRestart(Instrumentation.java:1139)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.Activity.performRestart(Activity.java:3805)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.ActivityThread.performRestartActivity(ActivityThread.java:3477)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:160)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.LocalActivityManager.dispatchResume(LocalActivityManager.java:518)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.ActivityGroup.onResume(ActivityGroup.java:58)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.Activity.performResume(Activity.java:3823)
02-29 12:53:53.463: E/AndroidRuntime(5066):     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)

when i am click listrow app is crashing in that case new data update call is started and i purged the timer and code of my event like this crashing my app sometime………

convertView.setOnClickListener(new OnClickListener(){

                    public void onClick(View v) {
                        timer.purge();
                        if(SessionText.get(position)!=null&&IPText.get(position)!=null){
                        Intent i=new Intent(BaseActivity.this,VisitorDetail.class);
                        i.putExtra("ID", id);
                        i.putExtra("Position",position);
                        i.putExtra("From", from);
                        i.putExtra("SessionText", SessionText.get(position));
                        i.putExtra("IPTEXT",IPText.get(position));
                        startActivity(i);

                        }

                        else{

                            timer.schedule(new TimerTask() {
                                public void run() {
                                    TimerMethod();
                                }

                            }, 0, 3000); 
                        }



                    }});

anyone can help me to solved out the issue…………………

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:36:37+00:00Added an answer on May 30, 2026 at 2:36 pm

    cancel timer onItemClick, so it wont update data when you have clicked on a item, and if it is needed after item click, start timer again, after call startActivity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need some help with overlaying views using the prism framework.Its a little more
Need help writing a script downloads data from google insight using c# this is
I need help with this route map routes.MapRoute(Blog_Archive, Blog/Archive/{year}/{month}/{day}, new { controller = Blog,
I need help getting my head around the difference between my current OOP notion
I need help to replace all \n (new line) caracters for in a String,
I know that there is already a question (actually some more) about this, but
Guys i need some help here , im getting this error here at the
I am making a small game, and I need some more help with it.
I have one worker role that throws data into around 10 queues that need
need help to create regular expression matching string www.*.abc.*/somestring Here * is wild card

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.