How to open a webpage within a BlackBerry application? - browser

I need to open a webpage from a BlackBerry application. I don't want to use a hyperlink so that users have to navigate to the blackberry browser application.
So, I basically need a full screen where the content of that particular page can be loaded just like a browser.
Is weblinks the answer to what I need or do I need to just invoke a browser session?
Thanks!

For BlackBerry applications you can use
BrowserSession session = Browser.getDefaultSession();
session.displayPage(url);
It will automatically open the browser with the given url. It's basically invoking the browser in your application context, so pressing the back button will take the user back to your application.

Related

How to open a new tab in a chrome extension and show data

I have a chrome extension which allows the user to perform actions and build up data. How can I get my chrome extension to open a new tab to allow my user to interact with the data they've accumulated? I could build a separate web app service where I pass the users data to. I currently persist the users data in local storage but I want a way for them to view/edit that data.
Not sure what exactly to google to get a chrome extensions to launch a new page under it's url...
Edit:
Ideally I'd like for my user to press a button from the popup.html popup to open up the new tab, if possible.
I got it to work, basically from the popup.html page I can make this javascript call,
chrome.tabs.create({url: chrome.extension.getURL('dashboard.html')})
where 'dashboard.html' is file belonging to my chrome extension.

awesomium open clicked linked in user's browser

I have a windows forms application that has Awesomium browser control in it.
I want if the loaded page in awesomium contains a link, to open it in the user's default browser (chrome, ff, ie...) when the user clicks it insread of loading inside awesomium itself.
Much thanks.
found the solution.
handle the URL click from your user at client side (JS).
Let JS call a AWESOMIUM C# function and pass the URL clicked.
In the C# do:
string url = args.Arguments[0];
Process.Start(url);
Hope this helps someone

is it possible to launch an extension from a website?

Had a qq: is it possible to launch an extension (that is already installed) when someone clicks on a link ?
For example, let's say on my website I have a button that says "click here to launch the extension". After they install my chrome extension, when a user clicks on this button, could the extension launch? (e.g.- the popup to open).
The goal is this: I have an extension that acts like a search bar. I also have search on the website, but I wanted it to search using the extension instead of the website if a user chooses to.
Thanks for any info,
Y
If you are asking for a way to programmatically open the extension's popup, then you will be disappointed (as it cannot be done).
If it serves your purpose, you could do something like this:
Have your extension inject a content script into your webpage.
Have the content script bind to a button's click event.
When the button is clicked: Pass some parameters to the extension's background page, let the extension perform the search and send the results back to the webpage.

how to open a itunes link in uiwebview

Is it possible to load a app store link in uiwebview. I have tried to open it in uiwebview but it doesnt load in there. I dont want users to leave my app when they click on the url from my app. Is it possible?
Regards
Pankaj
iTunes content does not have an "iTunes Preview" page on mobile - iOS automatically recognizes itunes.apple.com links and opens the store.
If you want to keep the user within your app, use SKStoreProductViewController to open the store to a specific piece of content. After the user dismisses the sheet, they are still within your app.
http://developer.apple.com/library/ios/#documentation/StoreKit/Reference/SKITunesProductViewController_Ref/Introduction/Introduction.html

Calling chrome.browserAction.setIcon from content script the way it is done in background script

I am making an extension for chrome. It fetches data from webpages and emails it via local email client. I have a toolbar button which user has to click to invoke the script.
My script works for a few selected urls. I want my toolbar button to change icon based on whether the url is among our list or not. For example for site1 it should be redicon.png and for site2 it should be blueicon.png. I can change button icon using chrome.browserAction.setIcon. But the problem is that this API does not work in content script. It works fine in the background.js file but not in content.js. Kindly tell me how to achieve this.
I know using pageAction instead would do the trick but my client requirement is that the toolbar icon should change rather than appear and disappear.
What you need to read about is message passing. You are right, content scripts have limited chrome API. However, you can contact background page from content script and tell it to execute anything from chrome API for you. First, you need to create a listener on a background page that will be waiting for messages and then send a message from a content script.

Resources