I am developing for the HTC Desire HD Android 2.3.3 API10. I have an app registered as homescreen which now finally starts up nicely after booting. Problem is, there is a Keyguard right after booting up, which is telling me there is no SIM card inserted, emergency only ... which I have to manually unlock.
The device will be part of an installation hanging from the ceiling or something, so it must start without human interaction.
How can I circumvent the startup keyguard?
I have this in the manifest:
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
and this code in place before the app does anything else:
Window wind = this.getWindow(); //Is this preventing Keyguard on startup??
wind.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
wind.addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);