Launch the browser from Java button click
Hi guys,.
Displays the first time, hoping that you guys can give me a steer. I am a novice at coding and am worried that I bit bigger I can chew!
I have the code snippet within a program, that I am putting together, and is that when the user clicks on the button full screen 'fullScreenC1111', the app will launch a web page. I'm not very good with managers and that sort of thing, so if someone could please take a look at my code and I would like to know how to add the functionality, I would be really grateful. If that's the case elsewhere where I offer my apologies for the double post...
class Cineberry extends net.rim.device.api.ui.UiApplication { public static void main(String[] args) { Cineberry instance = new Cineberry(); instance.enterEventDispatcher(); } public Cineberry() { pushScreen(new CountyList11()); } } import net.rim.device.api.ui.*; import net.rim.device.api.system.Display; import net.rim.device.api.ui.component.*; import net.rim.device.api.ui.container.*; import net.rim.device.api.system.Bitmap; import net.rim.device.api.ui.component.EditField; import net.rim.device.api.ui.component.ObjectChoiceField; import net.rim.device.api.ui.FieldChangeListener; import net.rim.device.api.ui.UiApplication; import net.rim.device.api.ui.Manager.*; import net.rim.blackberry.api.browser.Browser; import java.util.*; public class CountyList11 extends MainScreen { ButtonField btnCl111; ButtonField btnCl112; CustomButtonField fullscreenCl111; public CountyList11() { super(); Bitmap HELLO_LOGO = Bitmap.getBitmapResource("cineberry.png"); BitmapField helloBmpField = new BitmapField(HELLO_LOGO); add(helloBmpField); LabelField applicationTitle = new LabelField("Cineberry Location List"); setTitle(applicationTitle); add(new SeparatorField()); RichTextField cineberryTextField = new RichTextField("Please Choose a County"); add(cineberryTextField); add(new SeparatorField()); add(new RichTextField(Field.NON_FOCUSABLE)); fullscreenCl111 = new CustomButtonField("Omniplex Carlow", CustomButtonField.FULLSCREEN, Field.FOCUSABLE); fullscreenCl111.browserSession.displayPage("http://www.google.ie/movies?hl=en&near=carlow&dq=omniplex+carlow&theater=omniplex&ei=OMHYS5GIBIj00gS..."); add(fullscreenCl111); add(new SeparatorField()); btnCl111 = new ButtonField("Back To A - Z", ButtonField.CONSUME_CLICK | EditField.FIELD_HCENTER); btnCl111.setChangeListener(new ButtonListener2()); add(btnCl111); btnCl112 = new ButtonField("Back To Home Screen", ButtonField.CONSUME_CLICK | EditField.FIELD_HCENTER); btnCl112.setChangeListener(new ButtonListener1()); add(btnCl112); } }
I know that I imported without doubt too many packages as well, but I can understand that at a later stage.
Thanks in advance
.. and here's a simple way to call the browser on the latest OS levels:
Private browser = Browser.getDefaultSession ();
browser.displayPage ("www.google.com");
Tags: BlackBerry Developers
Similar Questions
-
Closing the browser with a single click from shape
Hi all
U please help me anyone how close the browser with a single click by pressing exit or close the cross button.
ArifIt's a path of the virtual directory of \tools\web90\html
in the Web server environment, you don't play with fix paths like c:\temp instead, we define the path to the application as a virtual directory server...
Replace as I mentioned in my previous post
-
Try to launch the browser via Wi-Fi on a 8820 and having not much of chance. Code looks like this:
Private private = Browser.getDefaultSession ();
browserSession.displayPage (url + "; interface = wifi");
The browser launches, but insists on the use on board.
I don't have this problem when calling direct http java app: adding '; interface wifi =' correctly routes the data via the WiFi network. For example, it's very well:
HttpConnection connection = (HttpConnection) Connector.open (url + "; interface = wifi");
Is there anything else I need to do to force the browser to use wifi?
Thank you
Nurikabe, the link in your message is the appropriate way to open the BlackBerry Hotspot browser.
-
How can I launch Adobe Reader.accept the end user agreement, quit and re-launch the browser?
Go to Launchpad, find Adobe Reader, double-click it.
-
Can someone help me fix this, I'm not able to launch the browser while trying to save EBS using openscript. His watch the error such that it is impossible to get a connection to the browser helper after 15 seconds.
Please suggest how to solve this problem.
Thanks in advanceHello
Please open Internet Explore.
Go to view-> toolbars and see if Oracle.OATS.OpenScript.IEToolBar.OpenScriptToolBar is enabled. If it is not checked so please check and then try to run and see if its working.
If its checked, then please uncheck and then check it in again, and then try to run.Kind regards
Rajesh -
Closing the PDF form on button click
Hi all
Is there any command/code to close the PDF form on button click event.
Thanks and regards-
Chalukya.
Hi Chalukya,
This will close the PDF form, but not the application (Acrobat/Reader):
app.execMenuItem("Close");
Good luck
Niall
-
Launch the application from a url in the browser for BlackBerry?
I'm developing an application where I will launch a url in the browser where I run my application.
Suppose if I click
google.com
, and then press enter, it will launch my app. For this, I tried with theHttpFilterRegistry
API.For reference, I use the HTTPFilterDemo application. But currently while launching the application, I get the
NullPointerException
.I wrote the code below I have the
openFilter
method:public Connection openFilter( String name, int mode, boolean timeouts ) throws IOException { Logger.out("Protocol", "it is inside the openFilter method"); _url = name.substring(2); _requestHeaders = new HttpHeaders(); _responseHeaders = new HttpHeaders(); _responseHeaders.setProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE, "text/html"); // Attempt to parse for the file name int slashIndex = name.indexOf('/', 2); if (_resultData == null) { final int modHandle = CodeModuleManager.getModuleHandle("AppLaunchBrowser"); Logger.out("Protocol", "here is the module handle:::" +modHandle); final ApplicationDescriptor[] apDes = CodeModuleManager.getApplicationDescriptors(modHandle); // final String[] arguments = new String[1]; final ApplicationDescriptor appDescriptor = new ApplicationDescriptor(apDes[0], new String[]{}); Logger.out("Protocol", "here is the app descriptor:::" +appDescriptor); try { final int appCode = ApplicationManager.getApplicationManager().runApplication(appDescriptor, true); Logger.out("Protocol", "here is the app code:::" +appCode); } catch (ApplicationManagerException e) { // TODO Auto-generated catch block e.printStackTrace(); } } return this; }
And I am creating alternative entry point in the application class and using as below:
public class AppLaunch extends UiApplication{ public static void main(String args[]) { Logger.out("AppLaunch", args+"length of the arguments::::" +args.length); if((args != null) && (args.length > 0) && (args[0].equals("background"))) { Logger.out("AppLaunch", "in the alternate entry point"); // Logger.out("AppLaunch", args+"length of the arguments::::" +args.length); HttpFilterRegistry.registerFilter("www.google.co.in", "com.innominds.ca", false); } else { Logger.out("AppLaunch", "Inside the Applaunch"); AppLaunch theApp = new AppLaunch(); theApp.requestForeground(); Logger.out("AppLaunch", "created the app launch object"); theApp.enterEventDispatcher(); // Logger.out("AppLaunch", "in the alternate entry point"); // HttpFilterRegistry.registerFilter("www.google.co.in", "com.innominds.ca", false); } } public AppLaunch() { checkPermissions(); showTestScreen(); } /** * This method showcases the ability to check the current permissions for * the application. If the permissions are insufficient, the user will be * prompted to increase the level of permissions. You may want to restrict * permissions for the ApplicationPermissionsDemo.cod module beforehand in * order to demonstrate this sample effectively. This can be done in * Options/Advanced Options/Applications/(menu)Modules.Highlight * 'ApplicationPermissionsDemo' in the Modules list and select 'Edit * Permissions' from the menu. */ private void checkPermissions() { ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance(); ApplicationPermissions original = apm.getApplicationPermissions(); if(original.getPermission(ApplicationPermissions.PERMISSION_BROWSER_FILTER) == ApplicationPermissions.VALUE_ALLOW) { // All of the necessary permissions are currently available return; } ApplicationPermissions permRequest = new ApplicationPermissions(); permRequest.addPermission(ApplicationPermissions.PERMISSION_BROWSER_FILTER); boolean acceptance = ApplicationPermissionsManager.getInstance().invokePermissionsRequest(permRequest); if(acceptance) { // User has accepted all of the permissions return; } else { } } /** * Shows the test screen to allow the user to exercise the application * permissions capabilities. */ private void showTestScreen() { UiApplication.getUiApplication().pushScreen(new AppLaunchScreen()); } }
can someone please help... Sorry for the almost total code display...
I was finally able to solve this problem. NPE is to come in other methods of recall because I'm implementation of the FilterBaseInterface.
-
Want to stay on the same blade after button click - Captivate 5
I have a button that I use to bring up a separate, a directory browser window. I need this button on every page of the module. I've got boxes to click to control the flow of the timeline from one page to another. When the user clicks on the glossary, it should stay on the current page, its information and dismiss the glossary. When I run it, the timeline stops for the button, and if clicked, the timeline progresses at the break of the click box, always on the same page. But if the user clicks on the button again, the pop-up window works but Captivate goes to the next page. Is it possible to prevent this, so that a user can click any number of times on the button without going through the progress of the timeline past this page?
Thanks for any help that anyone can provide.
Hi DS,.
I use a javascript call to do what you describe all the time.
Since I use all the time I incorporate the real full javascript in the "standard.js" Captivate file. This is the complete script:
function openBrWindow (theURL, winName, features)
{
Window.Open (Theurl, winName, Features);
}I save the file standard.js. On my desktop, it's the path to this file:
C:\Program Files\Adobe\Adobe Captivate 5\Templates\Publish\standard.js
Now I can call the script anytime.
Here's how to set up the click-box:
If you look at the picture of Rick (thanks Rick) in the menu control properties to the title of the Action, for the success, choose Run Javascript.
Then click on the button in the Script window, it opens an empty window. Given that you call just the javascript code, you need not put the script in the window. Here is an example:
JavaScript:openBrWindow('myURL.html','thewindowname','height=800px,Width=1000px,ScrollBars_=yes');
Example of THS opens a window 800px high and 1000 px in width with the scroll bars. You can add additional attributes if you wish. Make sure the URL is correct and is the correct path and if you have more than one of them on a slide that the name of the window will have to be different. (If this continues the slide to the slide you don't have to have them all as a single, only for more than one on a slide.
Now, click on the small arrow next to the button of the Script window. This produces a small drop down (as shown on the picture of Rick). Make sure you select 'Top' and disable the 'continue playing the Project '.
This control makes the newly laid on the project window and stops playback of the slide. You can set other options in the properties to enable or disable captions as needed.
I hope this helps.
TPK
-
ATT 8320 - launch the browser does not work
8320 with v4.5.0.110
I did have a problem with that on any other device, but I start the browser and close the app and it returns me to the Ribbon. However, when I open the browser, the page I started to.
On other devices, it opens the browser to the page.
I have attached the device and this is what happens:
Exit MyApplication (215)
Net_rim_bb_browser_daemon (73) foreground
Net_rim_bb_ribbon_app (80) foreground
FocusHistory: Acquired Focus; Home screen App; Component net.rim.device.apps.internal.ribbon.launcher.RibbonIconFieldHere is the code I use the launch of the browser. Maybe I should use System.exit (0)?
BrowserSession browserSession = Browser.getDefaultSession();browserSession.displayPage(url);System.exit(0);
Call the private showBrowser after displayPage. This brings the browser to the forefront.
-
Insert a row into the table on a button click
Hi all
I have a table called 'temp' with 4 columns such as seq, name, event, id and I have a GP with 3 text such as name, event id fields
now my question is
If I enter values in the 3 text fields on this page and a button, click on (for example create), I wanted the values of dose to get inserted into the table 'temp' and
regarding, "seq" column I HAV created a sequence for it.
so 1. How to insert values into the table by entering the values in the page
2 wat shd b made to column seq... (shd b anyth made apex pages or wil automatically get values for each input line)
pls help me...
Thanks in advance
1, it is up to you change your account to something more user-friendly than '8f4692cc-040e-48ee-b102-590cdd4303fc'.
Then, it would also be a good idea to use proper English when you ask a question here... Not broken English as "now comes to my" and "wat shd b"... More people will be willing to help you if you at least put forward in order to ask a good question...
Which version of the database are you using? APEX version?
Change the code above to this process:
DECLARE
v_seq NUMBER;
BEGIN
Select SEQUENCE_NAME. NEXTVAL INTO v_seq
Double;
INSERT INTO temp (seq, name, event, id)VALUES (v_seq,: P1_name,: P1_event,: P1_id);
END;
This allows it to be used in older versions of Oracle that do not allow direct access to the sequence.nextval in an assignment statement.
Thank you
Tony Miller
Software LuvMuffin
-
I've just updated to FireFox 11 and whenever I run the browser, I get this annoying window that checks for compatibility of modules.
I looked for solutions and have tried the following:
1 remove several extension files in the profile folder.
2 returning to about: config to disable the extension: checkcompatibility (is not here).None of them worked.
Have you tried to delete the prefs.js file?
- http://KB.mozillazine.org/Preferences_not_saved
- https://support.Mozilla.org/KB/preferences+are+not+saved
What security (firewall, antivirus) software do you have?
Some security software has features of virtualization that can cause protection problems and restoring files in the Firefox profile folder.
-
Open the browser of blackberry on click of a button?
Hello
I want to open the BlackBerry browser programmatically... say for example on the Click event of the button?
How can I do this?
Also guide me if associated with the useful material is available
Thank you.
Thanks Peter,.
It worked for me.
-
I get this message when you launch the browser in Photoshop CS 3
I just got a new macbook pro that I allocated GB 401 on my bootcamp for windows xp partition, and I put Photoshop CS3 (windows version) on this partition, which about 80-90 GB is used while the rest is space free space. I also put my photo on this partition folders/files, and when I run the Photoshop application, I get this dialog box when I click on 'File' > 'Browse' (see image).
When I launched photoshop on my old laptop (HP Compaq Presario X 6000 running Windows XP) I've never had this kind of message - is something wrong
How can I do if I don't get this message?
Here are the specs of my macbook pro:
Model name: MacBook Pro
Model identifier: MacBook Pro5, 3
Processor name: Intel Core 2 Duo
Processor speed: 3.06 GHz
Number of processors: 1
Total number of cores: 2
How can I paste my messages from another forum on my posts here? (Frustrated).
It does not properly detect some most likely SSE extensions, but don't let it stop you. It's just a side effect of computers becoming too recent for 3 year old software. Even if in strictly technical terms, there would be a performance degradation, reinforced specs of the newest processors would more than make up for it...
Mylenium
-
I had this KDL-60NX720 for about 4-5 years, solid as a rock. Rarely used TV Apps, hooked up to Roku and looked at from time to time of movies in 3D from NTS Network Sony TV APPs.
Today, I went on television and launched WEB TV browser, BIG MISTAKE. The State of TV bar off for 5 minutes, so I decided to turn off the TV and went outside. Came back a few hours later and the TV is over BRICKED.
Flashing lights RED (4 times, pauses, repetitions). Turns on for 2 seconds, then turns OFF, can't the factory reset. Same sequence of flashing. Uplift of my entertainment system all unplugged each HDMI cord and followed every possible diagnosis Voodoo that Sony has recommended.
Called and chatted with support. Downloaded the firmware on USB and plugged into the back. Waited 30 minutes. Same question above. Now 4 hours later, my life is in disarray and the TV is dead. Live sports game is on Roku and cannot look at anything. It's the weekend, Sony support just went offline.
Past $ 2500 on this TV. Now I think if Sony will be able to help, or carry this TV from the wall bracket and drive him to the technician that will require more than a new purchase.
What do Sony?
Thanks for sending the link to United States service centers. According to my note, I live in the Canada.
And have already looked at service Canada, 3 of the 4 centres centres have some negative reviews on Google. Not sure if Sony addresses the quality of service to their partners as well.
End of the road for another loyal customer of Sony and all of its network and friends/family. Too bad.
-
Message says: do not launch the application from the Application package
When I pulled any items in my folder of applications today, the screen came up with three options, organizer, Publisher of Photo and Video Editor. I just wanted to edit a file, but whenever I tried to click on items, I got an error message saying "Please do not run this application from this application package. In contrast, please launch Adobe Photoshop elements 13 & Adobe Premiere elements 13 in your Applications folder. "That's exactly how I started the program, so it doesn't make much sense. What I'm missing here?
Thanks in advance,
David Brown
You use the version of the App Store? There has been recent technical problems with Apple, with the only version of the editor. Go to this link:
Maybe you are looking for
-
I am a user of Windows XP Pro and so far has been affected by the problem of Windows Update BSOD even if I got my updates on. This brings me to the question, why this issue affects users of Windows XP and not others? Does anyone know?
-
Compaq Presario 6604AU-BIOS and other startup problems
My laptop Compaq Presario 6604 to THE beginning to give a lot of problems in recent times. Every day, I spend a lot time on their fixation; no resolution anyway. Problem 1: BIOS hangs at startup Problem 2: If the MESSAGE is finished, Windows crashes
-
Hi all This equipment is new and I am experiencing too slowly when I connect via SSH, privileged mode access, or commands like "show run" entry for example. At first glance, it seems to be excessive consumption (CPU utilization for five seconds: 2% 1
-
Where is the best place of ID? firewall firewall or inside outside?
-
Hi all.I use Forms 11 g 11.1.2.1 and updating JRE 7 45.I have create a jar file containing gif icons files using this procedure:(1) create the jar file:set path = % path %; C:\Oracle\Middleware\Oracle_FRHome1\jdk\bin (my ORACLE_HOME/jdk)jar - cvf web