how to create a webview in blackberry which allows me to only view the page and disable all other options - blackberry-webworks

How to create a webview which gives me only option of viewing the webpage and the rest of the options should be disabled.
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage("http://www.google.co.in/");
I tried this code but not able to disable the options in the browser.

Looks like you have the wrong tag of 'blackberry-webworks' for your post, sounds like a Java question?
In any event... BlackBerry WebWorks is essentially a webapp/webpage running natively on a device.
If you were to use WebWorks for development, you would simply create a webpage (html, css, javascript), and create a config.xml file which tells the SDK what your app is, what it wants access to do on the device, and request needed permissions, etc.
Once packaged, your app would run like any other app on the device. The cool thing about WebWorks is technically you can create a launcher for a website. It again would look like any other app, have it's own icon, and launch in it's own webview. You wouldn't have any of the browser address bars, or anything like that, so this may be the way to go.
If you want some 'Getting Started' info, check-out the HTML5 WebWorks webpage

I got the solution. It may help somebody
BrowserFieldConfig myBrowserFieldConfig = new BrowserFieldConfig();
myBrowserFieldConfig.setProperty(BrowserFieldConfig.NAVIGATION_MODE,BrowserFieldConfig.NAVIGATION_MODE_POINTER);
BrowserField browserField = new BrowserField(myBrowserFieldConfig);
add(browserField);
browserField.requestContent("http://www.google.co.in");

Related

How to make a plugin like app in iphone

I want to make an plugin like app in iphone for mobile web browser, in which i want to use safari (or any browser) current link and also link which is present on the web page, when i click on it my app should invoke for using targeted link.
I know plugins are not supported in mobile browser,
Can anybody have any solution without jailbreak?
Thanks in advance.

Open links from non-native app in Safari app

We are creating a non-native iPhone app that will eventually go through the phonegap process. But what I'm trying to do right now is: We have links that open in Twitter and LinkedIn, but when clicking them they open right in the same app window. Is there any way to force the links to open in the actual Safari app. It looks like this is possible with Objective-C, but I don't see how to do it with HTML. Thanks!
http://solutions.michaelbrooks.ca/2011/02/15/open-external-links-in-safariapp/

Phonegap WEB-APP without xCode

I'm building a simple web app for iOS that will not be published to the AppStore.
For infrastructure limits (and my boss!) , I can't use xCode anyway to build the app in a native way.
The only NATIVE functionality required by the web app should be a simple "Add to contacts".
I've tried to implement it with phonegap , but it works only compiled under xCode.
Is there any way to "add to contacts" without building an app (using only a web-app )?
Thanks in advance
Andrea
I don't think there's a way for you to add a contact directly, using only a web app.
PhoneGap was made for this sort of thing, allowing you to access a device's features (like Contacts, Camera, GPS, etc). But if your company's project specifications don't allow for an app... I don't know that there's a way to do this directly, via the web.
If you're building a web app... while you may be targeting iPhones, you're still making it available to anyone with a browser. I'm not 100% on this, but having some way for a web page to directly manipulate a (Mac) user's contacts seems like a security issue.
As a test, I tried placing a vCard on a page, and accessing it via my iPhone. Changing the extension from .vcf to .vcard didn't yield anything (and for some weird reason it prompted me to open the file via Dropbox).
What did work was emailing myself the vcard as an attachment. I was able to view the attachment, which then gave me the option to add the info as a new contact.

Can an app on mobile phone(iPhone) start another app?

E.g. When you download pdf on the browser (PC) hit starts the Adobe acrobat..similarly...can any app find another app is installed or not..and if its installed...can it start?
on iphone..when you click on a HTTP link from an app it starts browser automatically..similar..
There is limited support for declaring custom URL schemes. Have a look at the answer to a question I asked previously.

Add bookmark to Safari on iPhone when an application is installed?

I'd like to add a bookmark to a users Mobile Safari bookmarks when they install my iPhone application.
I don't want the user to have to do it manually, i'd like my iphone app to install the bookmark (actually a javascript based bookmark, e.g. javascript:)
Does anyone know of anyway to do this?
Not currently possible. The best I've seen is launching a page in mobile Safari with instructions on how to manually add the bookmark, or telling the user to add it on desktop Safari and sync the bookmark back to the iPhone.
This is not currently possible. If it's something you'd like to see, you should file an enhancement request with Apple.