Please have a look at the attached image it shows screen that i want for my activity. I want to stop user from proceeding further until he enters correct password. I want to this screen to come up when my phone boots after restarting.
I have written listener for listener device boot process.
public class DeviceStartUpListener extends BroadcastReceiver
{
@Override
public void onReceive(Context context, Intent intent)
{
if(intent.getAction().equals("android.intent.action.BOOT_COMPLETED"))
{
// some code
Intent authenticationIntent = new Intent(applicationContext, PostStartupAuthenticationActivity.class);
authenticationIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(authenticationIntent);
}
}
}
I want my PostStartupAuthenticationActivity to cover complete screen and ask user for password. This activity should hide all the button at bottom of screen. Your should not be able to move to any other activity until he enters correct password or until he enters wrong password for consecutive 3 times.
In PostStartupAuthenticationActivity i have written following code in onCreate method, but this is not working correctly, The activity is displayed full screen but the button at the bottom of screen are still visible eg home button and back button are still visible, I want activity to open in full screen mode but no button should visible at the bottom of screen, My present activity is looking like this, please find second attached image:-
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
mIntent = getIntent();
//set fullscreen and no title
// requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.post_starup_authentication_activity);
}
Thanks in advance.