Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HOME button doesn't work, is it possible to listen?

Ok here's my problem. Whenever I press the HOME button nothing happens. If i'm in an app and press it i'm not sent to the home screen like I should be.

However, if the screen is locked and i press it the screen will light up(because a key was pressed).

So from what i can tell, the system is registering the keypress for HOME but is not calling the "android.intent.category.HOME" intent.

Is there some way to monitor the HOME button, and if it's pressed call the "android.intent.category.HOME" intent from my app? I've looked all over StackOverflow, but I can't find any working way to listen for the HOME key when the HOME intent doesn't activate.

Review of issue:

HOME button press causes the system to wake up when locked, so the key obviously works..

HOME button will not cause the "android.intent.category.HOME" intent to activate, nor will it send all open apps to the background.

Any help?

like image 408
phoenixcoder Avatar asked Jul 30 '11 22:07

phoenixcoder


People also ask

Why did my home button stop working?

Update System Software. A possible reason why your Home button is not working is that you are using an older version of the Android firmware. Most device manufacturers push out new software updates every now and then, and this is to ensure you always have a bug-free experience on your device.

Why does my home button not work on my phone?

Force Reset Your Android Phone. If there is a temporary glitch in your system leading the home and back button not working android, force restarting your device should fix it for you. Press and hold down the Power button on your device for a few seconds. Your phone will begin to reboot.


1 Answers

I had this problem on my TF101, I think I erased some android settings with Titanium Backup. After I rebooted the device, Home button would do nothing, some quick settings would not show up and power button would show very few options.

A lot of sites prompted me to do a factory reset (backup and restore would take a day). After trying several possible solutions I came about this thread http://forum.cyanogenmod.org/topic/19605-home-button-issues-striking-back/ that solved it.

I used the android sdk installed on my Ubuntu, using the following steps:

  1. Use adb as su to retrieve the android settings database:

    sudo platform-tools/adb -d pull /data/data/com.android.providers.settings/databases/settings.db settings.db

  2. Use sqlite3 to check if device_provisioned=1 (this setting was missing)

    tools/sqlite3 settings.db "select * from secure;" | grep provision

correct answer would be "nnn|device_provisioned|1" where nnn is the number of the line. If there was no answer, you would have to add this setting to the file.

  1. Use sqlite3 to add this setting to the file

    tools/sqlite3 settings.db "INSERT INTO secure (name,value) VALUES ('device_provisioned','1');"

  2. Put the file back on your android device

    sudo platform-tools/adb -d push settings.db /data/data/com.android.providers.settings/databases/settings.db

  3. Power down android (at first I tried the reboot option on the power button menu, but it restored my faulty settings somehow. Afterwards I pressed the power button until the device shut itself down.)

  4. Power on. The Home button was working again (along with the other missing features).

like image 106
Frederico Camara Avatar answered Nov 15 '22 01:11

Frederico Camara