How to check if the home button was released or even the home activity cames out ?
This is a discussion on How to check if the home button was released or even the home activity cames out ? within the Droid Development forums, part of the Droid Hacking category; Hi to every one.
How can I check inside the OnRestart method, if the home button was released ?
or
When the home button is ...
-
How to check if the home button was released or even the home activity came out ?
Hi to every one.
How can I check inside the OnRestart method, if the home button was released ?
or
When the home button is released then the following intent is called { act=android.intent.action.MAIN ...}. How to check inside the method onRestart that the above Intent was called ?
Thank you in advance.
Last edited by asteroidg; 01-13-2011 at 02:44 PM.
Reason: -
-
-
I tried the following code:
ActivityManager am = (ActivityManager)this.getSystemService(ACTIVITY_SE RVICE);
List<ActivityManager.RunningAppProcessInfo> rs = am.getRunningAppProcesses();
for (int i=0; i<rs.size(); i++)
{
ActivityManager.RunningAppProcessInfo rsi = rs.get(i);
Log.i("ProcessLog", "Process PID=" + rsi.pid+"-"+rsi.processName);
}
The PID is the one that I need but the process always show me System, if it was a way to get from PID the following :
ActivityManager(81): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.android.launcher/.Launcher }
then that could solve my request about to know when Home activity came out ...
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
Similar Threads
-
By Ninelives29 in forum Tech Issues, Bug Reports & Suggestions
Replies: 2
Last Post: 12-24-2010, 10:48 AM
-
By eliju in forum LithiumMod
Replies: 2
Last Post: 09-17-2010, 09:40 PM
-
By karnage in forum Rescue Squad Help
Replies: 1
Last Post: 06-14-2010, 09:04 PM
-
By crewcheifgtaa in forum Motorola Droid
Replies: 8
Last Post: 03-28-2010, 07:48 AM
-
By eskanday in forum Droid General Discussions
Replies: 0
Last Post: 11-30-2009, 10:31 AM
Search tags for this page
activitymanager action main
,
activitymanager home key
,
android activity home button
,
android detect home button
,
android detect home button press
,
android detect home key
,
android detect home press
,
android home button detect
,
android how to check button is clicked released
,
android how to know if home button was pressed
,
detect home button android
,
droid bionic home button intent
,
how to detect home key android
,
iphone check if an object is released
,
menu highland
Click on a term to search our site for related topics.
Tags for this Thread