Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Home Screen Detection
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  20 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
GodsMoon  
View profile  
 More options Aug 27 2009, 5:40 pm
From: GodsMoon <godsm...@gmail.com>
Date: Thu, 27 Aug 2009 14:40:26 -0700 (PDT)
Local: Thurs, Aug 27 2009 5:40 pm
Subject: Home Screen Detection
I'm writing a back ground app and would like to be able to tell which
app is currently running (actually has focus).
I'm particularly interested in if the Home screen is being shown.
Can anyone help with this?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Chris Stratton  
View profile  
 More options Aug 27 2009, 6:06 pm
From: Chris Stratton <cs07...@gmail.com>
Date: Thu, 27 Aug 2009 15:06:28 -0700 (PDT)
Local: Thurs, Aug 27 2009 6:06 pm
Subject: Re: Home Screen Detection
On Aug 27, 5:40 pm, GodsMoon <godsm...@gmail.com> wrote:

> I'm writing a back ground app and would like to be able to tell which
> app is currently running (actually has focus).
> I'm particularly interested in if the Home screen is being shown.
> Can anyone help with this?

I got stumped on that too.

There is a call that will get a list of what is running and tell if it
has user-interactive level of priority, but that's not unique enough -
a few things (in call screen for example) keep this even when their
window is not visible.  Another problem is that latin input method can
show up in the list interactive priority, but you don't know what
application it is accepting input on behalf of.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Aug 27 2009, 6:24 pm
From: GodsMoon <godsm...@gmail.com>
Date: Thu, 27 Aug 2009 15:24:45 -0700 (PDT)
Local: Thurs, Aug 27 2009 6:24 pm
Subject: Re: Home Screen Detection
That might be enough info for my app.
Which api are you looking at?

On Aug 27, 6:06 pm, Chris Stratton <cs07...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Aug 28 2009, 12:07 pm
From: GodsMoon <godsm...@gmail.com>
Date: Fri, 28 Aug 2009 09:07:32 -0700 (PDT)
Local: Fri, Aug 28 2009 12:07 pm
Subject: Re: Home Screen Detection
I was looking at the Package Manager api, but it looks like the
Process api might be more useful.
http://developer.android.com/reference/android/os/Process.html
Has anybody used this before or have an example?

On Aug 27, 6:24 pm, GodsMoon <godsm...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hong  
View profile  
 More options Aug 28 2009, 1:46 pm
From: Hong <lordh...@gmail.com>
Date: Fri, 28 Aug 2009 13:46:22 -0400
Local: Fri, Aug 28 2009 1:46 pm
Subject: Re: [android-developers] Re: Home Screen Detection

ActivityManager : getRunningTasks(int)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Aug 28 2009, 1:53 pm
From: GodsMoon <godsm...@gmail.com>
Date: Fri, 28 Aug 2009 10:53:47 -0700 (PDT)
Local: Fri, Aug 28 2009 1:53 pm
Subject: Re: Home Screen Detection
What's the difference between a Task and a Process for
ActivityManager?

On Aug 28, 1:46 pm, Hong <lordh...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Aug 28 2009, 2:41 pm
From: Dianne Hackborn <hack...@android.com>
Date: Fri, 28 Aug 2009 11:41:05 -0700
Local: Fri, Aug 28 2009 2:41 pm
Subject: Re: [android-developers] Re: Home Screen Detection

They are described here:
http://developer.android.com/guide/topics/fundamentals.html

On Fri, Aug 28, 2009 at 10:53 AM, GodsMoon <godsm...@gmail.com> wrote:

> What's the difference between a Task and a Process for
> ActivityManager?

> On Aug 28, 1:46 pm, Hong <lordh...@gmail.com> wrote:
> > ActivityManager : getRunningTasks(int)

> > On Thu, Aug 27, 2009 at 6:24 PM, GodsMoon <godsm...@gmail.com> wrote:

> > > That might be enough info for my app.
> > > Which api are you looking at?

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Aug 29 2009, 12:59 pm
From: GodsMoon <godsm...@gmail.com>
Date: Sat, 29 Aug 2009 09:59:53 -0700 (PDT)
Local: Sat, Aug 29 2009 12:59 pm
Subject: Re: Home Screen Detection
I have a solution for home screen detection, but its slow and
horrible.
I run this bit of code every 1 seconds.

ActivityManager actvityManager = (ActivityManager)
this.getSystemService( ACTIVITY_SERVICE );
                List<RunningAppProcessInfo>  procInfos =
actvityManager.getRunningAppProcesses();

                for(int i = 0; i < procInfos.size(); i++)
                {

                        if(procInfos.get(i).processName.compareTo
( "android.process.acore") == 0
                                        && procInfos.get(i).importance ==
RunningAppProcessInfo.IMPORTANCE_FOREGROUND)
                        {

                                // Home Screen Detected! Do something...
                        }

                }

I hate continually polling a piece of code but I don't think there is
a broadcast intent that will help me out.

Do anybody know of a better way of doing this?

On Aug 28, 2:41 pm, Dianne Hackborn <hack...@android.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Aug 29 2009, 2:35 pm
From: Dianne Hackborn <hack...@android.com>
Date: Sat, 29 Aug 2009 11:35:40 -0700
Local: Sat, Aug 29 2009 2:35 pm
Subject: Re: [android-developers] Re: Home Screen Detection

No there is no API to do this.  What are you trying to accomplish?

Note that your code will break in many many situations -- when a custom home
screen is being used, on a device where the manufacturer is not using the
base platform home app, in the future when we have more memory so don't need
to run home in a shared process, etc.

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Aug 29 2009, 2:52 pm
From: GodsMoon <godsm...@gmail.com>
Date: Sat, 29 Aug 2009 11:52:21 -0700 (PDT)
Local: Sat, Aug 29 2009 2:52 pm
Subject: Re: Home Screen Detection
I'm writing an app that turns off the keyguard and I would like to
exitKeyguardSecurely when you user goes back to the home screen.
This works great when hitting the Home button, but the user can back
to the home screen without prompt by using the back button (I think
this is an API bug).
So I'm trying to determine if the Home screen is displayed so I can
force exitKeyguardSecurely.

I realize homescreen replacements will break this code but until the
API bug gets fixed I don't see a good way around this.

On Aug 29, 2:35 pm, Dianne Hackborn <hack...@android.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Aug 29 2009, 3:41 pm
From: Dianne Hackborn <hack...@android.com>
Date: Sat, 29 Aug 2009 12:41:52 -0700
Local: Sat, Aug 29 2009 3:41 pm
Subject: Re: [android-developers] Re: Home Screen Detection

On Sat, Aug 29, 2009 at 11:52 AM, GodsMoon <godsm...@gmail.com> wrote:
> I'm writing an app that turns off the keyguard and I would like to
> exitKeyguardSecurely when you user goes back to the home screen.
> This works great when hitting the Home button, but the user can back
> to the home screen without prompt by using the back button (I think
> this is an API bug).

What API bug?  Of course you can press back to go to the home screen.

What are you doing to determine when the user presses home?  Afaik there
isn't really a way to do this since the system completely consumes the home
key.

Unfortunately, I don't think there is any robust way to do what you want.  I
can't imagine an app being able to do this consistently with the current
API...  and that should kind-of give you a moment of pause since you are
messing with the lock screen and thus fundamental security of the device.

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Aug 29 2009, 3:54 pm
From: GodsMoon <godsm...@gmail.com>
Date: Sat, 29 Aug 2009 12:54:20 -0700 (PDT)
Local: Sat, Aug 29 2009 3:54 pm
Subject: Re: Home Screen Detection
Dianne Hackborn,
Are you familiar with the KeyguardManager class? Its really cool, I
haven't seen anything like it on any other platform and I'm excited to
take advantage of it.
http://developer.android.com/reference/android/app/KeyguardManager.html

It can take over the Home screen button

I've created a bug report.
http://code.google.com/p/android/issues/detail?id=3715

Thanks for your help.

On Aug 29, 3:41 pm, Dianne Hackborn <hack...@android.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dianne Hackborn  
View profile  
 More options Aug 29 2009, 7:39 pm
From: Dianne Hackborn <hack...@android.com>
Date: Sat, 29 Aug 2009 16:39:37 -0700
Local: Sat, Aug 29 2009 7:39 pm
Subject: Re: [android-developers] Re: Home Screen Detection

On Sat, Aug 29, 2009 at 12:54 PM, GodsMoon <godsm...@gmail.com> wrote:
> Dianne Hackborn,
> Are you familiar with the KeyguardManager class? Its really cool, I
> haven't seen anything like it on any other platform and I'm excited to
> take advantage of it.
> http://developer.android.com/reference/android/app/KeyguardManager.html

Yes I am.

> It can take over the Home screen button

I don't know what you mean.  As far as I know, it has nothing to do with the
home screen button, it just controls whether the lock screen is shown.

I've closed this as work as intended, because what you are requesting is not
how it is supposed to work.

You could look at the AlarmClock app to see an example if the API's use.

--
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Aug 29 2009, 9:23 pm
From: GodsMoon <godsm...@gmail.com>
Date: Sat, 29 Aug 2009 18:23:47 -0700 (PDT)
Local: Sat, Aug 29 2009 9:23 pm
Subject: Re: Home Screen Detection
I admit that what I'm trying to do is a little unorthodox and somewhat
creative. The idea I have does slightly change the way security works
on the phone. However, I don't think I'm abusing the API or decreasing
security. Its somewhat hard to explain my app idea. I will be
releasing a video of my app in action for the ADC2 fairly soon.
I'll post back here once it is released the video. I'd love to get
feedback to make sure I'm not doing anything I'm not suppose to.

Thanks for your help.

On Aug 29, 7:39 pm, Dianne Hackborn <hack...@android.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hong  
View profile  
 More options Sep 3 2009, 5:39 pm
From: Hong <lordh...@gmail.com>
Date: Thu, 3 Sep 2009 17:39:10 -0400
Local: Thurs, Sep 3 2009 5:39 pm
Subject: Re: [android-developers] Re: Home Screen Detection

I found the video:
http://www.youtube.com/watch?v=ipue9Yhi5VA

NICE WORK!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Sep 8 2009, 4:02 pm
From: GodsMoon <godsm...@gmail.com>
Date: Tue, 8 Sep 2009 13:02:38 -0700 (PDT)
Local: Tues, Sep 8 2009 4:02 pm
Subject: Re: Home Screen Detection
Dianne,
I've published a video to give you a better idea of the problem I'm
having with the back button protection. Hopefully my video helps show
the problem I am having.
http://www.youtube.com/watch?v=ipue9Yhi5VA
The bug I mention in the video is NOT the bug report I filed out but
rather http://code.google.com/p/android/issues/detail?id=2643
Anyway, does this give any more credence to My bug report?

Also, I'm not abusing the API, am I? I would guess that the
KeyguardManager was not designed to be triggered with a background
processes, but a lot of people are quite interested in my app and I'm
excited to release it soon.

Thanks for the input,
David Shellabarger

On Sep 3, 5:39 pm, Hong <lordh...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Sep 15 2009, 7:57 pm
From: GodsMoon <godsm...@gmail.com>
Date: Tue, 15 Sep 2009 16:57:20 -0700 (PDT)
Local: Tues, Sep 15 2009 7:57 pm
Subject: Re: Home Screen Detection
ping...

On Sep 8, 4:02 pm, GodsMoon <godsm...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hong  
View profile  
 More options Sep 24 2009, 4:03 pm
From: Hong <lordh...@gmail.com>
Date: Thu, 24 Sep 2009 16:03:16 -0400
Local: Thurs, Sep 24 2009 4:03 pm
Subject: Re: [android-developers] Re: Home Screen Detection

My 1st ADC 2 judging app is Smart Lock ^_^ interesting!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
GodsMoon  
View profile  
 More options Sep 24 2009, 4:50 pm
From: GodsMoon <godsm...@gmail.com>
Date: Thu, 24 Sep 2009 13:50:11 -0700 (PDT)
Local: Thurs, Sep 24 2009 4:50 pm
Subject: Re: Home Screen Detection
Hong,
I hope you like it.

If you have any issues please email me :)

On Sep 24, 4:03 pm, Hong <lordh...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hong  
View profile  
 More options Sep 25 2009, 1:30 pm
From: Hong <lordh...@gmail.com>
Date: Fri, 25 Sep 2009 13:30:32 -0400
Local: Fri, Sep 25 2009 1:30 pm
Subject: Re: [android-developers] Re: Home Screen Detection

Thanks!

It works great!  The best ADC II entry I've seen so far :)


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »