On Sun, Jan 29, 2012 at 3:25 AM, arun kumar <[email protected]> wrote:
> Hi
>
> in the first activity am givning the uname and pass values in the
> intent...and get that data in the
> second activity
>
>
> String login = getIntent().getStringExtra(
> "Username"); and this data login value i have to pass to the
>
> UsernamePasswordCredentials creds = *new*
> UsernamePasswordCredentials(
>
> "login", "logpass"); here how to place the login value in the
> credential..
>
>
>
> firstactivity:::::
>
> Intent intent = *new* Intent(getApplicationContext(),
> SecondScreen.*class*);
>
> intent.putExtra("Username", uname.getText().toString());
> System.*out*.println("username:" + uname);
> intent.putExtra("Password", pass.getText().toString());
> System.*out*.println("password:" + pass);
> startActivity(intent);
>
>
>
> Second Activity::::::::
>
> String login = getIntent().getStringExtra(
> "Username");
>
> System.*out*.println("login entered:"+login);
>
> String logpass = getIntent().getStringExtra("Password");
>
> System.*out*.println("password entered:"+logpass);
>
> *try* {
>
> HttpClient httpclient =
> *new* DefaultHttpClient();
>
> UsernamePasswordCredentials creds =
> *new* UsernamePasswordCredentials(
>
> "login", "logpass");
>
> ((AbstractHttpClient) httpclient).getCredentialsProvider()
>
> .setCredentials(
>
> *new* AuthScope(AuthScope.*ANY_HOST*,
>
> AuthScope.
> *ANY_PORT*), creds);
>
>
ok, good, what the problem are you facing?
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en