Forums Register Login

what is the best way to add a log out button in android

+Pie Number of slices to send: Send
what is the best way to add a log out button in android?
I tried with kill the activity? is it good way ?
+Pie Number of slices to send: Send
What does "log out" mean for the app? Into what would a user be logged in?
+Pie Number of slices to send: Send
i have no clear idia about log out in android as android doesn't maintain session like Web.
+Pie Number of slices to send: Send
Well, if you can't articulate what being logged in means, then it's impossible to advise how logging out might work.
+Pie Number of slices to send: Send
Ideally the app should have (at a minimum) two sets of functionality. One which is available to logged in users and the second to all users (Of course this is generic, and would solely depend on what your app does)
Logging out would typically take the user to the non logged in functionality screen which can be anything (welcome screen, login screen, whatever.) Again it depends on your application.
Since you are the only one who knows what the application does, its for you to decide.
+Pie Number of slices to send: Send
in my app users must login to do anything.But my problem is how to log out after login. Currently i am clicking back button and go to login page.
+Pie Number of slices to send: Send
Which brings us right back to this still unanswered question:

Ulf Dittmer wrote:Into what would a user be logged in?

 
+Pie Number of slices to send: Send
user loged into aapplication.
+Pie Number of slices to send: Send
Okay. That was easy after all. So, your logout button should either end the application or take the user to the login page. That would be your choice.
+Pie Number of slices to send: Send
1)how to end the application?

2) i tried with direct to login page.But my username and password already there ?how to remove them when i direct to login page ?
+Pie Number of slices to send: Send
From the login screen before you start the next activity, clear the login / password so that when the user comes back, its blank.
+Pie Number of slices to send: Send
thanks
+Pie Number of slices to send: Send
when i direct to login page it work fine.Anyway when i try to login again iti didn't login.I think its related to Oncreate method as it doesn't run twice.

below is my login code

+Pie Number of slices to send: Send
I still have the issue.I added toas messages in on create and on click methods ,when i tried to login 2nd time none of toasts messages were shown.that means it doesn't execute any methods.can anyone please tell me where is the issue ?
+Pie Number of slices to send: Send
isue resolved now.thanks all.
Why does your bag say "bombs"? The reason I ask is that my bag says "tiny ads" and it has stuff like this:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 7342 times.
Similar Threads
can we destroy another activity
is it possible to capture all events?
Logout page
movable text view or button
Does android have any wizard style frameworks?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 01:09:01.