views:

35

answers:

1

Hi,

Based on the user requirements, he wants to use our android application via pin code access like login whenever he starts to use this application. In Android or any mobile, most of the applications start again the last using layout. so which event should i call this login alertdialog to access each time users start to use it? Or let me know the better. Thank you.

A: 

You will have to add a snippet of code in each Activity you have so that it ask the user to type the user & password. If you are using normal activities I guess you can add the snippet inside methods like onRestoreInstanceState so that you can be sure it will be executed as soon as the user (re)open the activity.

Cristian
Thank you. In my application, there are more than five activities or layouts. mostly user will use one activity and then another. So I think system should ask it once, (re)opening one main activity. If not, it makes users boring.