Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3602002
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:41:28+00:00 2026-05-18T20:41:28+00:00

My application requires the user to login on their first visit, and then it

  • 0

My application requires the user to login on their first visit, and then it stores this in SharedPreferences for any future times the application is launched.

I’m trying to implement a sign out feature, and I’m wondering what the best way would be.

As of right now, my LoginActivity and SignOutActivity are separate since they occur on different screens. Ideally, I’d like to be able to store the preferences in a way that both of these activities can access the login data and have it still be secure. How would all of you suggest I handle this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:41:29+00:00Added an answer on May 18, 2026 at 8:41 pm

    Either just use the default SharedPreferences or get the SharedPreferences with the same name in both activities; the whole point of them is that they’re shared 🙂 I’m a little worried that you think SharedPreferences are actually secure or isolated; they’re not. Anyone with root permission can read them (although other apps without root permission can’t by default). If you’re storing passwords or anything like that, encrypt them.

    There are 3 modes for SharedPreferences: MODE_PRIVATE, MODE_WORLD_READABLE and MODE_WORLD_WRITEABLE. MODE_PRIVATE, the default and the most restrictive one, still allows free access to the Preferences to any activity in your own app (or any other app you create with the same user ID).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application requires the user to login on their first visit, and then it
I am working on a web application which requires the user to login before
I made a C# Windows Forms application that requires the user to login using
I'm writing an Android application which requires the user to login. I have a
I am working on an Android application that requires a user to login before
My PHP+JS+Ajax application requires users to log in, then saves login data to $_SESSION.
In my application, if the user gave their gmail account then i am required
I have made an application which allows a user to login using their facebook
I have an application that requires the user to reenter their password between 15
I am writing an iPhone application which requires the user to enter several values

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.