Please, do NOT do this. You are ruining the user experience. First of
all, your application will be offered to the user every time the user
really wants to go Home (for instance, after booting the phone) but
your application is NOT a Home screen. Then you are preventing the
user from always recovering his workflow by going back to a safe and
known state, the Home screen from where he can access the settings and
launch other apps. What you are doing is a disservice to your users
and to your application.

On Tue, Nov 11, 2008 at 7:10 PM, zl25drexel <[EMAIL PROTECTED]> wrote:
>
> answering my own question again:
>
> to disable home button, make your activity a home activity (see
> samples/HOME in the SDK) then use
>  pm = getPackageManager();
>  pm.addPackageToPreferred(getPackageName());
>
> in your activity's oncreate() method to make your home activity the
> preferred home activity, that way your app will stay on when the home
> button is pressed by the user.
>
> remember remove that preference when your activity is stopped.
>
> Jay
>
> On Nov 11, 12:33 pm, hackbod <[EMAIL PROTECTED]> wrote:
>> It didn't, it is a huge hack where it restarts itself when the user
>> tries to leave it.  It's a cute hack for the toddler lock, but far
>> from something any normal application should do.  (And seriously, the
>> system -should- detect this and kill an app that is doing it.  I would
>> consider the fact that toddler lock can do this to be a bug in the
>> system.)
>>
>> On Nov 11, 8:33 am, zl25drexel <[EMAIL PROTECTED]> wrote:
>>
>> > anyone?
>>
>> > On Nov 10, 9:53 pm, zl25drexel <[EMAIL PROTECTED]> wrote:
>>
>> > > so how did the toddlers lockdisablethehomebutton?
>>
>> > > On Nov 10, 9:41 pm, Romain Guy <[EMAIL PROTECTED]> wrote:
>>
>> > > > Not if the app starts on boot. (You can always boot in safe mode but
>> > > > still... it's annoying.)
>>
>> > > > TheHomekey is the best way for the user to go back to a familiar
>> > > > place. That's why pressingHometwice, no matter where you are, will
>> > > > always take you back to the center screen onHome'sdesktop.
>>
>> > > > On Mon, Nov 10, 2008 at 6:26 PM, zl25drexel <[EMAIL PROTECTED]> wrote:
>>
>> > > > > you only need to restart the phone.
>>
>> > > > > On Nov 10, 8:51 pm, Mark Murphy <[EMAIL PROTECTED]> wrote:
>> > > > >> zl25drexel wrote:
>> > > > >> > why is making the screen lock actually lock evil?
>>
>> > > > >> 1. If the app has a bug, and won't "unlock", the user is hosed
>>
>> > > > >> 2. If the app is malicious, and won't "unlock", the user is hosed
>>
>> > > > >> The Google team has tried to minimize any chance of a rogue 
>> > > > >> application
>> > > > >> causing problems, particularly permanent ones. This approach has
>> > > > >> trade-offs; making it difficult todisablethehomebuttonis one of 
>> > > > >> those.
>>
>> > > > >> --
>> > > > >> Mark Murphy (a Commons Guy)http://commonsware.com
>>
>> > > > >> Android Training on the Ranch! -- Mar 16-20, 
>> > > > >> 2009http://www.bignerdranch.com/schedule.shtml
>>
>> > > > --
>> > > > Romain Guywww.curious-creature.org
> >
>



-- 
Romain Guy
www.curious-creature.org

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

Reply via email to