Hi,
Following is my updated condition,
 
I have created my custom System service and that service is started by 
SystemServer.
I want to aquire wakelock but it is not working properly. I am doing 
various tasks in this service like starting application, handling key 
events etc.. But it only unlocks the screens @ Menu Button event.  Is there 
something related to keyevents and If I want to unlock screen while 
starting any app just like phone app, then is there any need to set 
particular Intent ?

here is my code snippet :

    public TestService(Context context){
    
    PowerManager pm = (PowerManager) 
context.getSystemService(Context.POWER_SERVICE);
    mWakeLock = pm.newWakeLock(PowerManager.FULL_WAKE_LOCK,TAG);
    
    mWorker = new WorkerThread();
    mWorker.start();
    
    }
    
    
    WorkerThread extends Thread{
    
    
    public void run(){
    
    if(condition){
    // It is not working.
    mWakeLock.aquire();
    
    }
    
        
      }
        
    }


Please help to resolve this issue.

Thanks,
Yuvi

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to