You can know that the screen is currently off, you acquired the wake lock,
so when you see the screen go on it is probably due to you.
This has race conditions, but I don't think there is any point in trying to
reduce them because what you are asking to do is fundamentally racy: the
user could
If it's a code induced screen-on, I want to switch bluetooth off.
If it's a user induced screen-on, I want to switch bluetooth on.
On Wednesday, April 4, 2012 10:10:09 AM UTC+5:30, TreKing wrote:
On Tue, Apr 3, 2012 at 4:21 AM, Put_tiMe putt...@gmail.com wrote:
I want to handle this intent
Sorry, a slight correction:
If it's a code induced screen-on, I want to switch bluetooth on/off
(toggle).
If it's a user induced screen-on, I want to switch bluetooth on.
Code induced screen-on is initiated from Alarm-manager.
On Wednesday, April 4, 2012 12:26:49 PM UTC+5:30, Put_tiMe
Screen-on can be done in two ways:
1. User pressing the power (or home button)
2. Through code: by using power manager - wake lock - with screen-on flag.
Either ways, I get a 'Intent.ACTION_SCREEN_ON' intent.
Is there anyway I can distinguish between the two intents?
**
**
--
You
On Tue, Apr 3, 2012 at 2:29 AM, Put_tiMe putt...@gmail.com wrote:
Is there anyway I can distinguish between the two intents?
If you explain why you need to distinguish, maybe you'll get a hand in
employing a solution to the actual problem you're having.
I have registered for SCREEN_ON intent.
In the alarm-manager, I grab a wake_lock with
*FULL_WAKE_LOCK* flag and that switches on the screen.
This sends a SCREEN_ON intent.
In the meanwhile, the user could also have switched on the screen.
I want to handle this intent in different ways,
On Tue, Apr 3, 2012 at 4:21 AM, Put_tiMe putt...@gmail.com wrote:
I want to handle this intent in different ways, depending on where it
originated from.
You still didn't explain *why*.
-
TreKing
7 matches
Mail list logo