[android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-19 Thread Zsolt Vasvari
Don't have a server and this is what my users asked for. They don't want prying eyes for their financial data. The password is optional and a yet to receive a bad comment about this feature. On Jul 19, 2:34 am, Streets Of Boston flyingdutc...@gmail.com wrote: Requiring  users to re-type their

[android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-18 Thread Zsolt Vasvari
Sure... I have a helper method that I call from all activities' onPause() method. It saves the current time in the application's presistent preferences: public static void setAppLastHiddenTime(Context context) { Preferences.setLong(context,

[android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-18 Thread Streets Of Boston
Requiring users to re-type their passwords every time they leave the app (even if not by their doing, e.g. when receiving a phone-call or reacting to a notification), may reaallly start to annoy your users. And if your app needs a high level of security, i can imagine that the users' passwords

Re: [android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-17 Thread Frank Weiss
Why do you need to force the user to login again just because their personal workflow involved starting an activity in a different application? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-17 Thread Anthoni
Hello, I also do this, BUT I do not put it into every single activity. What I do is create a Handler at application level and a time check object. The handler fires every say 10 seconds and checks the time object. If it matches what I need I broadcast an event across my entire application. Each

Re: [android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-17 Thread Kim Damevin
@Frank weis: my application requires a high level of security, so if the user leaves it I don't want that someone else who would use the android mobile can open it without having to log in. Thanks for all your replies it helps a lot ! I think i will go for the timeout method. It's a good point

[android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-16 Thread Streets Of Boston
You have no control over the application and/or activity life cycle. This will make is very hard to determine when the user 'exits' the app. I would do this: 1. Consider an explicit 'log-out' option for your users. 2. Add a time-out to your login-sessions. Refresh the session (time- out) when the

[android-developers] Re: Best way to logout each time the application/task goes to background

2010-07-16 Thread Zsolt Vasvari
1) This is not the best option, at least not without option 2, as the user can still leave without having the opportunity to log out, for example to answer a call. 2) I do this, it's a bit of a pain as I need to check the timeout in every activity, and I have at least a couple of dozens. So it's