Lock screen disabling at call End

by Zealousian » Wed, 05 Aug 2009 15:23:07 GMT


Sponsored Links
 hi,
   I have a requirement to disable the Lock Screen, after the call.
normally whats happening is when call starts in onresume :
app.disableKeyguard(); is called and again in onpause :
app.reenableKeyguard(); is called. but this is just temporary state
changing. I cant use this at the end of the call. if i do so then
there is misbehaviour in lock state.
so i would like to know how to disable the Lock Screen at the end of
the call ?
i have already tried

        void exitKeyguardSecurely()
        {
        final KeyguardManager keyguardManager = PhoneApp.getInstance
().getKeyguardManager();
        final PhoneApp app = PhoneApp.getInstance();
        keyguardManager.exitKeyguardSecurely(new
KeyguardManager.OnKeyguardExitResult() {
                public void onKeyguardExitResult(boolean success) {
//              app.reenableKeyguard();
//              app.disableKeyguard();
                        //app.setLockScreen(false);
                        Log.i("degug_log", "onPause"+"KeyGaurd ExitResult");
                }});
        }

but still its not working.
do update me or correct me if i am wrong in my understanding.

regards
Zealousian
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to make a widget that doesn't drain the battery and updates often



You are missing the point. Unless you have evidence that your alarms go
off on devices other than your own, it may simply be a matter of some
WakeLock being wedged on your own device.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android App Developer Books: http://commonsware.com/books

-- 

2. How to make a widget that doesn't drain the battery and updates often

> Frankly, I don't know why the Genie... service sticks around for the

Neither do I, but it seems "everyone" is taking this approach. I
really really miss guidelines on Android development. Both GUI design
guidelines (toolbars at the bottom anyone?) and design guidelines for
widgets doing more advanced things than updating a clock. It must be
100 different toolbars out there at the moment in various sizes. Why
can't we have a proper toolbar in Android? Sorry, off-topic :-)


I would love to see some better suggestions :-)

No wake-locks. Only using the following code to make the widget change
headline:
...
am.set(AlarmManager.RTC,  System.currentTimeMillis() + 5000,
pendingIntent);
...

According to the documentation this should work just brilliant. But my
phone is dead every morning with my widget running. Uninstalled!


Well, people will blame my widget even if I try to tell them that they
have another application that has wake_locks so I must make my widget
behave nicely with the rest of the apps out there.

Well I have made a new service that runs all the time and receives
broadcast events for screen off and on and that works great, so maybe
I'll stick with this. When I have started 10 of my favourite apps I
have a lot of services running so I guess people are used to this.
Seems like services is a bit overused these days so no wonder everyone
complains about battery life with Android...

-Christer


-- 

3. auto shutdown & reboot

4. Non Standard Preview Format on Samsung SPH M900

5. OOT : C3

6. HTC Incredible suffering a reset while service running.

7. How to make a widget that doesn't drain the battery and updates often