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 7537811
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T06:57:09+00:00 2026-05-30T06:57:09+00:00

The activity works fine until the home key is pressed. Then when the app

  • 0

The activity works fine until the home key is pressed. Then when the app is started from the menu, the activity doesn’t respond to the button press for the button listed below. When the orientation is changed then the activity starts working again.

Is this fixed by implementing(overriding) an on** method?? (ie. onResume() or onStart())

Here are my onStop and onDestroy

  @Override
    protected void onStop()
    {
        if(broadRecvr!=null)    {try{unregisterReceiver(broadRecvr);} catch(RuntimeException re) {re.getStackTrace();}}
        super.onStop(); 
    }
    @Override
    protected void onDestroy()
    {
        super.onDestroy();
        if(wifiToggled)
        {wifi.setWifiEnabled(!wifiToggled);}
    }

these are the logcat errors; the whole logcat output is way too long to paste:

 E/ActivityManager(99): fail to set top app changed!
 E/KINETO(183): KLOG0C3- xmk_QueryOSQueue SDL Queue empty : WAIT_FOREVER 
 E/KINETO(183): KLOG0A3- ibs_os_GetMsg: Timeout forever for UKCC qHnd 0x814396ac
 E/KINETO(183): KLOG0C3- xmk_QueryOSQueue SDL Queue empty : WAIT_FOREVER 
 E/KINETO(183): KLOG0A3- ibs_os_GetMsg: Timeout forever for UKCC qHnd 0x814396ac
 E/KINETO(183): KLOG0C3- xmk_QueryOSQueue SDL Queue empty : WAIT_FOREVER 
 E/KINETO(183): KLOG0A3- ibs_os_GetMsg: Timeout forever for UKCC qHnd 0x814396ac

I am wondering how to fix a button that is not responding.
This is the button code that is not working after pressing the home key:

public void setupButtons()
    {
        buttonScan = (Button) findViewById(R.id.bScan);
        buttonScan.setOnClickListener(new View.OnClickListener() {  
            public void onClick(View v) {    wifi.startScan();  }   });
    }

I am calling setupButtons() in the onCreate method.

Also, I have noticed that the buttonScan doesn’t respond when I go to turn on the GPS via system menu and then return.

  • 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-30T06:57:10+00:00Added an answer on May 30, 2026 at 6:57 am

    Solved. As I surmised, this is solved in my case by implementing the onResume method. Since onCreate is not called after an activity is resumed. Resume happens after user hitting the home button and going back to the activity. Since nothing has changed the it is not redrawn (happens @ onCreate) until the orientation is changed. Makes perfect sense to me why this is the right answer.

    @Override
    public void onResume() {
        super.onResume();
        //code goes here
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The following code works fine on Android 2.1update1 - package com.troubadorian.android.teststreaming; import android.app.Activity; import
I have a strange problem using a MapView in Android. It works fine until
I currently have the code below it works fine up until I actually try
I am using a thread and a handler in android. The app works fine
I tried to get the intent from integer. The String get intent works fine
This code works fine if I move the findViewById call in to the Activity.
Cancellation Handler works good for Composite activities like CAG, Parallel activity. I need to
I launch an activity to capture a picture from camera: Intent i = new
I've got an Android activity which grabs an RSS feed from a URL, and
My app is receiving data from a BlueTooth device 4 times a second, parsing

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.