Thursday, March 24, 2011

Re: [android-developers] is it possible to disable the home key for an activity?

Please check the Toddler Lock application. They can disable the Home key.
Check this out https://market.android.com/details?id=marcone.toddlerlock

Whenever Home key pressed the intent is:
Intent {
act=android.intent.action.MAIN
cat=[android.intent.category.HOME
flg=0x10200000
cmp=com.android.launcher/.Launcher
}

For the Toddler Lock app
Logcat shows:
Intent {
act=android.intent.action.MAIN
cat=[android.intent.category.HOME
flg=0x10200000
cmp=marcone.toddlerlock/.LockScreen
}

I am trying with a BroadcastReceiver. But I think the Intent priority
to register the receiver doesn't allow to set priority more than the
Launcher. I might be wrong. But as they did it (although the app
doesn't work in Samsung devices) it is feasible of course.

I am guessing there is some missing link.

Please share your ideas.


On Tue, Mar 1, 2011 at 2:46 AM, Justin Anderson <magouyaware@gmail.com> wrote:
> That could cause major problems... The home key is supposed to be the user's
> safe way to get back to a stable state.  If you could disable the home key
> then an app could wreak havoc that would require you to reboot your phone to
> get to a stable state.
>
> On Mon, Feb 28, 2011 at 1:36 PM, TreKing <trekingapp@gmail.com> wrote:
>>
>> On Mon, Feb 28, 2011 at 2:34 PM, Aruna Shidling <aruna.shidling@gmail.com>
>> wrote:
>>>
>>> Is it possible to disable the Home key for an activity which shows alert
>>> dialog ?
>>
>> No, you can't intercept the Home Key.
>>
>>
>> -------------------------------------------------------------------------------------------------
>> TreKing - Chicago transit tracking app for Android-powered devices
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscribe@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscribe@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

--
Ahsanul Karim Romel
phone:+8801731541394

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate