Help to do a trick on the Lock screen

by Renan » Fri, 20 May 2011 09:30:36 GMT


Sponsored Links
 Hello!

I'm doing an App that need's to interfere with the Lock Screen...

I have a service running, and i need in some point of my service, to
UNLOCK the screen, just as if the user touch-slided the unlock thing
on the screen.

How can i do that???

THanks!

-- 



Other Threads

1. Problems capturing keys

Forgive me for asking what seems like an easy question, but I am new
to Android, and have spent hours getting this far, only to find a
problem running my code on the handset.

I am trying to force an EditText field ('Cost') to only allow:
Numbers, a Period and DEL
In addition, I want the ENTER key to fire a Button Click for
'CalculateBtn'.

I have the following code:
        EditText txtCost = (EditText) findViewById(R.id.Cost);
        txtCost.setOnKeyListener(new OnKeyListener()
        {
                        @Override
                        public boolean onKey(View arg0, int arg1, KeyEvent 
arg2) {
                                if(arg1==KeyEvent.KEYCODE_ENTER)
                                {
                                        Button btnCalculate = (Button) 
findViewById(R.id.CalculateBtn);
                                        btnCalculate.performClick();
                                        return true;
                                }
                                //else if(arg1 == 46 || arg1 > 47 || arg1 < 58)
                                else if(arg1==KeyEvent.KEYCODE_DEL ||
arg1==KeyEvent.KEYCODE_PERIOD || arg1==KeyEvent.KEYCODE_0 ||
arg1==KeyEvent.KEYCODE_1 || arg1==KeyEvent.KEYCODE_2 ||
arg1==KeyEvent.KEYCODE_3 || arg1==KeyEvent.KEYCODE_4 ||
arg1==KeyEvent.KEYCODE_5 || arg1==KeyEvent.KEYCODE_6 ||
arg1==KeyEvent.KEYCODE_7 || arg1==KeyEvent.KEYCODE_8 ||
arg1==KeyEvent.KEYCODE_9)
                                {
                                        return false;
                                }
                                else
                                {
                                        return true;
                                }
                        }

        });

Testing in Eclipse, I thought everything was working fine, but when I
installed it on my handset (Nexus One) and ran it, I found that I
could type whatever characters I wanted using the on-screen keyboard!

It doesn't seem like this is a hard nut to crack, but I have so far
failed to find a solution.

Thanks for any pointers.

Alex

-- 

2. My first android application. i need advise

I want your opinion on how i can improve it. My company's goal is to
take the customers feedback to create the ultimate applications.

Name: Sudoku
Url: http://market.android.com/search?q=pname:com.altair

-- 

3. How can i show a prefilled contacts screen on android 2.0

4. SmsManager and double SMS message

5. How to create an icon on the status bar ?

6. How to lock the Screen customly? Just like WaveSecure in Android

7. Why?