-3
我是黑莓的新手。我要如何在browserfield如何驗證給定的用戶名密碼登錄Browserfield在黑莓
BrowserField web;
String Usname="[email protected]";
String password="123456788";
setTitle("sample");
String Welcome ="[email protected]/isloginmethod.aspx";
String logindata ="LoginID="+Usname+"&Password="+password;
byte[] encodeLogin =Base64OutputStream.encode(logindata.getBytes(),0,logindata.length(), false, false);
BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
web = new BrowserField(myBrowserFieldConfig);
add(web);
web.requestContent(Welcome,encodeLogin,null);