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

  • Home
  • SEARCH
  • 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 6589711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:12:35+00:00 2026-05-25T17:12:35+00:00

I have the following:- public class resApp extends MapActivity implements Runnable { public void

  • 0

I have the following:-

public class resApp extends MapActivity implements Runnable {

    public void run() {
        searchImage.setVisibility(View.GONE);
    }

}

I also have a background thread that runs before this but that seems to run ok.

When i run the app the run() never gets called.

Can you help?
This code did work about 6 months ago but the device was 2.1.

Thanks

Chris


edit

I had already implemented

 private Handler handler;

 handler = new Handler() {
 @Override
public void handleMessage(Message msg) {
    if (msg.toString().equalsIgnoreCase("1")) {
    ad.dismiss();
    } else {
    pd.dismiss();
    }
}
 };

as an example and I already have an asynchronous task that runs in the back ground and in 2.1 I could have getters and setters in there. I have now had to pull these out and put them into the run() method as 2.2 doesn’t like setting onclicklistener in an async task.
All I need to do is call the run() method on post execute but have tried everything:-

protected void onPostExecute(Object result) {
// Pass the result data back to the main activity
if (dialog != null) {
    resApp.this.dialog.dismiss();
}
}

Could I just do:-

 handler = new Handler() {
    @Override
public void handleMessage(Message msg) {
    this.resApp.run();
}
 };
  • 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-25T17:12:36+00:00Added an answer on May 25, 2026 at 5:12 pm

    You can call the run() method by using Handler.

    Handler myHandler = new Handler();
    resApp myObj;
    

    And call it by using myHandler.post(myObj);

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

Sidebar

Related Questions

I have following code: public class readSensorsData extends Activity implements SensorListener { /** Called
I have following code: public class ShowActivity extends ListActivity implements OnItemClickListener { /** Called
I have following class public class ButtonChange { private int _buttonState; public void SetButtonState(int
I have following code public class TEST { public static void main(String arg[]){ try
I have the following two functions: public class MyClass { public void Save<TObject>(TObject object)
Say I have the following: public class A { //stuff public class B implements
I have the following: public class Foo<T extends Grok> extends ArrayList<T> { } How
I have following code: public class reader extends Activity { WebView mWebView; String mFilename;
So I have the following: public class Singleton { private Singleton(){} public static readonly
Lets say I have the following: public class MyObject { [Bindable] public var foo:int

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.