Sometimes we need to display web page on top of our blackberry application
to display help page or link some web page in such cases we can use this method to
call that web page.That opens given web page on top of application
public void run()
{
//getPage method is also i have mentioned in This Blog
//please refer that
try {
BrowserSession bSession = Browser.getDefaultSession();
byte bytes[] = getPage("www.google.com").getBytes();
//To use this You have download "org/apache/commons/codec"
//and save in src folder
Base64 bb=new Base64();
byte bytes1[]=Base64.encodeBase64(bytes);
String str=new String(bytes1);
bSession.displayPage("data:text/html;base64,"+str);
}
catch (Exception e)
{
Dialog.alert("Error In connecting="+e.toString());
}
}
I hope to share my knowledge with the others in software and networking industry
Subscribe to:
Post Comments (Atom)
Empowering the Future of API Management: Unveiling the Journey of WSO2 API Platform for Kubernetes (APK) Project and the Anticipated Alpha Release
Introduction In the ever-evolving realm of API management, our journey embarked on the APK project eight months ago, and now, with great a...
-
First you have to download the font file "filename.ttf" to you machine. Then you need some permissions to add those files to fold...
-
Remove current installation of Nginx sudo apt-get purge nginx nginx-common nginx-full Install Nginx sudo apt-get install nginx Edit c...
-
Here i'm explaining solution for manage multiple API Manager environments and external key management server to build central API r...
getpage() method available at this post
ReplyDeletehttp://sanjeewamalalgoda.blogspot.com/2009/08/get-requested-page-from-http-connection.html