Monday, September 12, 2011

[android-developers] authentication

Hi,

i have to connect to the sap server...i got the user name and password at the server side...

final String username = "arun";
                final String password = "kumar";

 Authenticator.setDefault(new Authenticator() {
                    protected PasswordAuthentication getPasswordAuthentication() {
                          PasswordAuthentication pa = new PasswordAuthentication (username, password.toCharArray());
//                          System.out.println(pa.getUserName() + ":" + new String(pa.getPassword()));
                          return pa;
                      }
                    });


Thankyou

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate