how to display web page in blackberry application? - blackberry

i have to display web page in my application .
but i m unable to get web page.i m using pushGlobalScreen() for getting new screen and then i have to display web page
i m using this code
BrowserSession site=Browser.getdefaultSession();
site.displayPage(url);
site.showBrowser();
pls help me how can i display web page in my application

sudhan, your question isn't very clear. However, if you want to get a webpage from your app, you could take two ways:
1) Invoke web browser and send your application to background. Check this tutorial for more information:
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800440/How_To_-_Invoke_the_browser.html?nodeid=1487366&vernum=0
2) If you're working in OS 5.0 or newer, you can use BrowserField and display the webpage within your application.
http://docs.blackberry.com/en/developers/deliverables/18125/Browser_field_1184788_11.jsp

Related

How do I display a web page in my app, in a way that it does not take the user out of the app itself?

I want to display a webpage in my app using dart. How would I do this, so that the user isn't directed out of the app but views it in a way similar to webview for android?
You can use webview plugin:
https://pub.dartlang.org/packages/flutter_webview_plugin
Or
URL luncher:
https://pub.dartlang.org/packages/url_launcher

Communication between rails application and chrome app

Currently working on a rails application , i want to send and receive data to this chrome application https://github.com/GoogleChrome/chrome-nfc.
I added chrome.runtime.sendMessage() function inside app.js file to send a simple "hello world" to my browser and
chrome.runtime.onMessage.addListener(function(response,sender,sendResponse){alert(response);});
to show it but I get nothing.
Is it the right way to communicate between them ?
Are you using near field (NFC)? If not, you may want to do something much more simple to pass info between your Chrome App and Rails on server, use an XHR request:
https://developer.chrome.com/apps/app_external#external

Load web page in PhoneGap app

I'm using PhoneGap with AngularJS framework.
I want to display a web page. I tried to use iframe but scroll isn't working.
I want to keep this page inside my app and not as a in app browser or external browser.
My app is running on iOS, Android and WP8 both.
Some help please :)
Thanks in advance
function loadWebView(pid)
{
var url = "http://dummysite.com/index.php/catalog/product/view/id/"+pid;
$("#div_load_page").html('<object data='+url+' class="webview"/>');
};
This is simple jQuery I've applied in my phonegap application which gives me the desired result. Scroll bars are visible and depend on site's responsiveness and size.
See Result.

IBM Worklight/Cordova does not load in embedded WebView in Worklight on Android

I try to create a hybrid Worklight app to aggregate multiple external Portal pages. There is a tab bar and each view in the tab bar loads its own WebView to display a different Portal page. This works fine and I have everything running but Worklight does not load in the Webviews. I want to access Cordova features like the camera inside the Portal pages.
Worklight initializes fine when I load a Portal page directly in the master Webview, but it does not load in an embedded Webview, i.e. all necessary Worklight files are there and the Portal page is set up right.
I enhanced this example:
http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v506/09_06_Integrating_server_generated_pages_in_Worklight_applications.pdf
This is the important part of the code:
webViewOverlay = new WebView(this);
webViewOverlay.setWebViewClient(webViewClient);
webViewOverlay.setWebChromeClient(new WebChromeClient());
webViewOverlay.getSettings().setJavaScriptEnabled(true);
webViewOverlay.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
webViewOverlay.clearCache(true);
webViewOverlay.loadData(""http://mymielke.de/test/portal/test.html"", "text/html", "UTF-8");
At least from reading your text, it sounds - to me - like what you're trying to accomplish is nothing like the sample you are basing it on?
The sample is a Worklight Hybrid app with three tabs, the first two simply load some HTML and JavaScript resources that are bunnled in the app (hence are in the Worklight instance and can use whatever the app holds in it, including PhoneGap functionality), and the third third tab is a WebView Overlay that loads an external website.
If this external website wants to access device features using PhoneGap, then PhoneGap needs to be local to the website that is hosted in the external server; Worklight-provided functionality (this includes PhoneGap), will not be available to this external website.
But, then you write:
Worklight initializes fine when I load a Portal page directly in the
master Webview, but it does not load in an embedded Webview, i.e. all
necessary Worklight files are there and the Portal page is set up
right.
Where is "there"? On the external server? There is no reason for Worklight to function this way, as it is outside of the Worklight app scope. You cannot expect to have "multiple" Worklight applications within the same application, loaded so-called remotely(?). (well, you can expect it if you want to :), but it doesn't work that way...)
Have I understood you correctly? If not, feel free to edit your question and make it clearer.

Titanium Studio Webview not letting me interact with website

Part of an app I am working on needs to access an external website to answer a few questions.
When that is needed, I am opening a web view and the URL set to this site. The page loads fine, but there is no way to interact. The textfields cannot be edited and the buttons cannot be clicked. To make sure it was not my website (works from iOS safari fine) I pointed the web view to www.google.com and cannot click the search button there either. Basically:
var webView = Titanium.UI.createWebView({url: 'http://www.google.com'});
win.add(webView);
win.open();
Is there some trick to being able to interact with the website through a web view? At this time I cannot use a native app and web service and need to get the app working with the existing website to fill out this form.
Titanium Studio 2.1.2 and iOS6
Maybe are you putting some View (Ti.UI.View) after putting the WebView in the Window?

Resources