well i am writting a screen lock app. so i need to lock all buttons.
The toddler lock is one of the most popular apps in the market, and it
does similar trick to disable the home button. so why cant i do the
same?

On Nov 11, 10:43 pm, hackbod <[EMAIL PROTECTED]> wrote:
> Oh good lord.  I forgot that API was still there.  This will be
> removed in a future version -- this was an old version of keeping
> track of preferred applications, and completely conflicts with the new
> better way of doing it per activity.
>
> On Nov 11, 7:11 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.
>
> > On Nov 11, 10:10 pm,zl25drexel<[EMAIL PROTECTED]> wrote:
>
> > > answering my own question again:
>
> > > todisablehomebutton, make your activity ahomeactivity (see
> > > samples/HOMEin the SDK) then use
> > >  pm = getPackageManager();
> > >  pm.addPackageToPreferred(getPackageName());
>
> > > in your activity's oncreate() method to make yourhomeactivity the
> > > preferredhomeactivity, that way your app will stay on when 
> > > thehomebuttonis 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:
> > > > > > > >>zl25drexelwrote:
> > > > > > > >> > 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
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to