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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T00:57:53+00:00 2026-06-06T00:57:53+00:00

I’ve made .NET web service, so far my android application can communicate with my

  • 0

I’ve made .NET web service, so far my android application can communicate with my web service. Now, I want to make a login form, and I’m confuse with the values from my web service.

Here is my code for login:

// Login button Click Event
        btnLogin.setOnClickListener(new View.OnClickListener() {

            public void onClick(View view) {
                try
                {
                    inputUser = (EditText) findViewById(R.id.loginUser);
                    inputPassword = (EditText) findViewById(R.id.loginPassword);
                    String user = inputUser.getText().toString();
                    String password = inputPassword.getText().toString();
                    hasil = "START";

                    Panggil call = new Panggil();
                    call.user = user;
                    call.password = password;
                    call.join();
                    call.start();

                    while (hasil.equals("START")){

                        try{
                            Thread.sleep(10);
                        }

                        catch (Exception ex){

                        }
                    }

                    if (hasil != ""){
                        loginErrorMsg.setText("");
                        // Launch Dashboard Screen

                        // Send User Full Name to Dashboard Screen
                        Intent dashboard = new Intent(getApplicationContext(), DashboardActivity.class);
                        dashboard.putExtra("myname", hasil);

                        // Close all views before launching Dashboard
                        dashboard.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
                        startActivity(dashboard);

                        // Close Login Screen
                        finish();
                    }
                    else{
                        // Error in login
                        loginErrorMsg.setText("Incorrect username/password");
                    }
                }

                catch(Exception ex)
                {
                    ad.setTitle("Error!");
                    ad.setMessage(ex.toString());
                    ad.show();
                }
            }
        });

From that login code, I get the value for hasil like this:

anyType{ccduser=myusername; password=123456}

How to extract or parsing that value and use it for IF..ELSE.. condition for login?

  • 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-06T00:57:55+00:00Added an answer on June 6, 2026 at 12:57 am

    I will put this as an answer..

    I would suggest you to use JSON to pass data from ws to client and back, there are a lot of free library on the internet for .NET and android.. also Android has JSON parser API integrated

    You can use also XML but for mobile I would recomand JSON because it is more lighter and you can find a lot of libraries for it.. You can also develop your own data encapsulation format but it will take some time and if you would want in the future to make your client app to work with other servers or your server to send data to other clients you will have to get back and use some standards like JSON or XML.

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

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from

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.