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 7903955
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:52:36+00:00 2026-06-03T09:52:36+00:00

Hey guys i am currently working on an android app that will allow me

  • 0

Hey guys i am currently working on an android app that will allow me to login with a registered user and then post how much he heighs, his collesterol level and so on, trough web services using ksoap, and i don’t know how to keep the user logged on trough a web service like ksoap for then to introduce the values. I don’t have code yet i am just trying to figure out how am i going to do it, because in android i guess you could say i am still taking baby steps. The website where the info will be posted is already created but i need to know how i keep the user logged in so that then i can put his numbers and send trough the web services to the site db the right values to the right user.

  • 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-06-03T09:52:37+00:00Added an answer on June 3, 2026 at 9:52 am

    Well , you can save boolean variable in Shared Preference when user logged in . So when ever you want to send data you need to check the value of that boolean variable . if its true then you can send data otherwise redirect to login page.

    When user logged out then you need to set false to that variable in shared preference or clear shared preference.

    Example

    public class PreferenceData 
    {
        static final String PREF_USER_ID = "user_logged_in";
    
        public static SharedPreferences getSharedPreferences(Context ctx) 
        {
            return PreferenceManager.getDefaultSharedPreferences(ctx);
        }
    
        public static void setUserLoggedIn(Context ctx, boolean userLoggedIn) 
        {
            Editor editor = getSharedPreferences(ctx).edit();
            editor.putBoolean(PREF_USER_ID, userLoggedIn);
            editor.commit();
        }
    
        public static boolean getUserLoggedIn(Context ctx) 
        {
            return getSharedPreferences(ctx).putBoolean(PREF_USER_ID, false);
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys, Im working with wpf 3d, im currently writing a program that will
Hey guys I have a query that currently finds the latest comment for each
Hey guys quick question, I am currently echoing a lot of javascript that is
Hey guys another rails issue, Currently have a collection that is line items for
Hey guys, I'm currently testing my app by adding the setting bundle into my
Hey guys, I'm currently trying to implement a function using C that takes in
Hey guys... I'm working on creating one of my first websites and currently have
Hey guys currently the way I frame my sprites in my Android game requires
Hey guys quick question, I currently have an insert statement $query= INSERT into new_mail
Hey guys, I currently present my mp3s by referencing their file location into a

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.