My application is launched on car docking event, I want to wake up phone (done by system) and unlock screen when I plug my device.
Is it posssible ?
I'm use for upping activity to top level
private Window wind;
@Override
protected void onResume() {
// TODO Auto-generated method stub
super.onResume();
/******block is needed to raise the application if the lock is*********/
wind = this.getWindow();
wind.addFlags(LayoutParams.FLAG_DISMISS_KEYGUARD);
wind.addFlags(LayoutParams.FLAG_SHOW_WHEN_LOCKED);
wind.addFlags(LayoutParams.FLAG_TURN_SCREEN_ON);
/* ^^^^^^^block is needed to raise the application if the lock is*/
}