| »Sponsored
Links |
BlackBerryApps.com Best Sellers
|
|
 |
|
Thumbs Must Hurt
Posts: 186
Join Date: Oct 2006
Location: nYc & CT
Model: 8820
Carrier: AT&T/Sprint/Nextel
|
Broswer-Based Push Application Help! -
10-24-2006, 04:16 PM
I have found many threads discussing this, but I seem to still be missing something
Basically I need to deploy a custom home-screen icon that simply points to a local intranet webpage to all my handhelds automatically, which RIM calls a "Browser-Based Push Application"
Can someone hold my hand with this??
Thank you in advance,
BES Admin/Nextel 60x 7520's/10x AT&T 8800's/2x BES
"Knowledge breeds confidence and confidence breeds success"
|
|
|
|
|
Thumbs Must Hurt
Posts: 153
Join Date: Aug 2005
Location: Upul Bandara from Colombo Sri Lanka -----------------------------
Model: 7290
Carrier: Dialog
|

10-24-2006, 11:50 PM
Did u work with Simulator? Is it work?
I mean can u access that page via Simulator.
Did you ever compare Affrican Elephants and Sri Lankan Elephants?
Where are classic Elephants?
 Upul
|
|
|
|
|
CrackBerry Addict
Posts: 837
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
|

10-25-2006, 05:38 AM
i would say you need a simple small application that only calls the browser application with a certain url as a parameter.
java developer, Devinto, hamburg/germany
|
|
|
|
|
CrackBerry Addict
Posts: 714
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
|

10-25-2006, 05:44 AM
Quote:
|
Originally Posted by simon.hain
i would say you need a simple small application that only calls the browser application with a certain url as a parameter.
|
this class will do that:
private static void LaunchBrowser(){
boolean retval = true;
int handle = CodeModuleManager.getModuleHandle("net_rim_bb_brow ser_daemon");
if (handle <=0 ){
retval = false;
System.exit(0);
}else{
ApplicationDescriptor[] browserDescriptors = CodeModuleManager.getApplicationDescriptors(handle );
if (browserDescriptors == null ){
retval = false;
System.exit(0);
}else{
if ( browserDescriptors.length <=0 ){
retval = false;
System.exit(0);
}else{
String[] args = {"url", "http://mywebsite.com/index.htm"};
ApplicationDescriptor descriptor = new ApplicationDescriptor(browserDescriptors[0],"url invocation", args,null, -1, null, -1,ApplicationDescriptor.FLAG_SYSTEM);
try{
ApplicationManager.getApplicationManager().runAppl ication(descriptor);
}catch(ApplicationManagerException e){
retval = false;
}
System.out.println("trying website = " + args[1]);
System.exit(0);
}
}
}
}
|
|
|
|
|
Thumbs Must Hurt
Posts: 186
Join Date: Oct 2006
Location: nYc & CT
Model: 8820
Carrier: AT&T/Sprint/Nextel
|

10-26-2006, 09:59 AM
I have looked at the PHP ShortcutUtility script and couldnt get it to work, IIS returned a 404 error on submission with installed PHP companion....
What do I do with this class?
Objective: Push a Browser-Based Application with a custom home-screen icon that resolves to a Intranet site for all 65 of my BB 7520 handhelds.
Please help!
BES Admin/Nextel 60x 7520's/10x AT&T 8800's/2x BES
"Knowledge breeds confidence and confidence breeds success"
Last edited by guruleenyc : 10-26-2006 at 10:24 AM.
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

11-02-2006, 03:29 PM
jfisher ... your class code requires a signed use of the "CodeModuleManager".
I'm not sure what all the LaunchBrowser class does, besides that obvious, but you allude to it launching the browser on a web link.
Why not ...
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage("http://www.mywebpage.com");
Regards,
Eric
EDIT: whoops ... my bad, Browser is also a signed object.
Last edited by ecarmody : 11-02-2006 at 03:48 PM.
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

11-02-2006, 04:01 PM
anyways, guruleenyc, here is a complete java app that you can compile with the BlackBerry JDE. It does require the use of a signed element for the "Browser" class element which will cost you or your company $100 to register with RIM.
You can compile run/test this in the simulator without issues, but if you try to download to a device it won't run unless its signed.
To meet all your objects, this isn't exactly a push. However, you can host the compliled application code, which is the .COD file, on your companies web server (needs MIME type set up), and then you only need to email out to your users an email with the http link to the .cod file. They do a "Get Link" in the email and the application gets installed and the icon shows on the BB desktop.
Also, for custom icon, in the JDE tool, you add an icon file to the project, right click on it and set to Application icon. Then complile the app and load to your device.
Code:
package WebLaunch;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.system.*;
import net.rim.blackberry.api.browser.Browser;
import net.rim.blackberry.api.browser.BrowserSession;
public class WebLaunch extends UiApplication
{
public static void main(String[] args)
{
WebLaunch theApp = new WebLaunch();
theApp.enterEventDispatcher();
}
public WebLaunch()
{
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage
("http://www.google.com"); //or your intranet site
System.exit(0);
}
}
Regards,
Eric
Last edited by ecarmody : 11-02-2006 at 04:08 PM.
|
|
|
|
|
New Member
Posts: 2
Join Date: Apr 2006
Model: 7250
|

11-09-2006, 09:22 AM
This works great but how do you stop it from reloading the web page each time you run the app?
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

11-09-2006, 10:50 AM
Not sure what you mean. The app is meant to run the browser and load the web page, acting like a shortcut. Each time you run it, it runs the browser linked page.
|
|
|
|
|
New Member
Posts: 9
Join Date: Jun 2006
Model: 7290
|

12-07-2006, 08:49 AM
I have attempted to get this working. However, when I click 'Get Link' on the .COD file I have uploaded to our web server, I receive back the following error...
Quote:
|
'HTTP Error 406 Not Acceptable'
|
Which goes on to state...
Quote:
'The resource identified by the request can only generate response entities that have content characteristics that are "not acceptable" to the Accept headers sent in the request
Please contact the server's administrator if this problem persists'
|
I would find this massively beneficial for our company if I could get this to work. Please could someone assist?
Thanks in advance,
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

12-07-2006, 09:53 AM
I'm not exactly sure what that message is all about; I would suspect you have not set up the MIME type properly on your server. You web server needs to know how to handle http requests for the .COD file type.
Google around for "BlackBerry MIME server setup" or something along those lines, you should find the steps.
Regards,
Eric
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

12-28-2006, 09:45 AM
Steven ... did you get this to work?
I realize this is a bit old, but in looking over that past post I realized I misled. The HTTP link in the email should point to the .JAD file, not the .COD file, as I originally said.
You need to copy both the .COD and .JAD files to your web server. You still need to set up the MIME type.
Regards,
Eric
|
|
|
|
|
New Member
Posts: 7
Join Date: Jul 2006
Model: 8100
Carrier: Cingular
|
browser app -
04-19-2007, 07:41 AM
I have tried using this code in the BB JDE --- it requires a signature, which have completed.
I have one issue -- I have tried loading this via the desktop manager but the icon does not show up. I don't have any IT Policies in place to hinder the install.
Am I missing something?
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

04-19-2007, 11:22 AM
maself711 ... Sorry, I don't have an answer for you on that issue. Installing an application, via desktop manager, should be a straight forward thing.
Check the project propertise. Make sure it has a name. Use the Clean option. Rebuild and try again.
|
|
|
|
|
New Member
Posts: 7
Join Date: Jul 2006
Model: 8100
Carrier: Cingular
|

04-19-2007, 07:00 PM
Well, I have been able to correct my issue with loading the icon on the BB and it seems to work correct in the simulator.
Meaning when I click on the icon it start the browser window and acts as if it is requesting the web page.
However, when I install on the BB, the ICON does not launch the browser. It looks like it is calling the information down as there is activity in and out arrows on the BB, but the browser window never opens. So, if I go to the browser on the BB and open the page I have called is there.
I am looking to have my ICON open the page I am calling not just load it in the other browser page.
Does anyone have any ideas?
|
|
|
|
|
Knows Where the Search Button Is
Posts: 42
Join Date: Sep 2005
Model: 9700
OS: Windows 7
Carrier: AT&T/Cingular
|

05-01-2007, 03:02 PM
Compiled /signed this code..works great thanks.
I do have an issue that if the default browser is set to the Internet browser on the device, I'm unable to launch the Intranet URL
Is there a way to specify to use the Blackberry Browser instead of the default browser ?
Appreciate your help..just getting started with Java / RIM development
Thanks
Quote:
Originally Posted by ecarmody
anyways, guruleenyc, here is a complete java app that you can compile with the BlackBerry JDE. It does require the use of a signed element for the "Browser" class element which will cost you or your company $100 to register with RIM.
You can compile run/test this in the simulator without issues, but if you try to download to a device it won't run unless its signed.
To meet all your objects, this isn't exactly a push. However, you can host the compliled application code, which is the .COD file, on your companies web server (needs MIME type set up), and then you only need to email out to your users an email with the http link to the .cod file. They do a "Get Link" in the email and the application gets installed and the icon shows on the BB desktop.
Also, for custom icon, in the JDE tool, you add an icon file to the project, right click on it and set to Application icon. Then complile the app and load to your device.
Code:
package WebLaunch;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.system.*;
import net.rim.blackberry.api.browser.Browser;
import net.rim.blackberry.api.browser.BrowserSession;
public class WebLaunch extends UiApplication
{
public static void main(String[] args)
{
WebLaunch theApp = new WebLaunch();
theApp.enterEventDispatcher();
}
public WebLaunch()
{
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage
("http://www.google.com"); //or your intranet site
System.exit(0);
}
}
Regards,
Eric
|
|
|
|
|
|
Talking BlackBerry Encyclopedia
Posts: 259
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
|

05-01-2007, 04:19 PM
Hey all,
Not to co-opt the thread, but does anyone know how to:
1: Embed the browser within another rich client app like a Picture in Picture instead of just launching it externally?
2: Load the browser with html/wap content instead of a url, there are demos for this on the technical knowledge base but the 4.0 jde balks at this, expecting a url string, not content.
|
|
|
|
|
Knows Where the Search Button Is
Posts: 42
Join Date: Sep 2005
Model: 9700
OS: Windows 7
Carrier: AT&T/Cingular
|

05-03-2007, 08:20 AM
Was able to acheive what I wanted using the code snipet on RIM's website
Livelink - Redirection
thanks
Quote:
Originally Posted by batrad
Compiled /signed this code..works great thanks.
I do have an issue that if the default browser is set to the Internet browser on the device, I'm unable to launch the Intranet URL
Is there a way to specify to use the Blackberry Browser instead of the default browser ?
Appreciate your help..just getting started with Java / RIM development
Thanks
|
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

05-03-2007, 11:05 AM
bemshaswing ...
I think using the RenderingSession and BrowserContent, both from the net.rim.device.api.browser.field package, will give you what you want. The example I tried out from the tech knowledge base last year used both these classes together.
Regards,
Eric
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

05-03-2007, 11:07 AM
Thanks for the tip, batrad.
|
|
|
|
|
New Member
Posts: 7
Join Date: Dec 2004
Model: Pearl
Carrier: AT&T
|
clarification -
11-16-2007, 12:00 PM
Ecarmody - thanks for sharing the code, this was exactly I was looking for and i have already signed my application. I have a small problem, I am not a Java guy so this might be a dumb question. I copied the code as you gave into a .java file and created a MIDlet project but when I say compile all I get the following error.
C:\Program Files\Research In Motion\BlackBerry JDE 4.2.0\bin\rapc.exe -quiet -noconvertpng import=..\lib\net_rim_api.jar;..\lib\net_rim_api.j ar codename=FMobile -midlet FMobile.rapc warnkey=0x4b505454;0x52424200;0x52435200;0x5252540 0
Warning!: No entry points found
WebLaunch: Warning!: No definition found
com.rim.resources.FMobileRIMResources: Error!: Class: WebLaunch has no member: <init>
Error while building project
thanks in advance,
KK
Quote:
Originally Posted by ecarmody
anyways, guruleenyc, here is a complete java app that you can compile with the BlackBerry JDE. It does require the use of a signed element for the "Browser" class element which will cost you or your company $100 to register with RIM.
You can compile run/test this in the simulator without issues, but if you try to download to a device it won't run unless its signed.
To meet all your objects, this isn't exactly a push. However, you can host the compliled application code, which is the .COD file, on your companies web server (needs MIME type set up), and then you only need to email out to your users an email with the http link to the .cod file. They do a "Get Link" in the email and the application gets installed and the icon shows on the BB desktop.
Also, for custom icon, in the JDE tool, you add an icon file to the project, right click on it and set to Application icon. Then complile the app and load to your device.
Code:
package WebLaunch;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.system.*;
import net.rim.blackberry.api.browser.Browser;
import net.rim.blackberry.api.browser.BrowserSession;
public class WebLaunch extends UiApplication
{
public static void main(String[] args)
{
WebLaunch theApp = new WebLaunch();
theApp.enterEventDispatcher();
}
public WebLaunch()
{
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage
("http://www.google.com"); //or your intranet site
System.exit(0);
}
}
Regards,
Eric
|
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

11-16-2007, 01:33 PM
kk - the sample weblaunch app is written as Blackberry CLDC type, not a generic MIDLET. The errors your getting suggest you have the project propertise set to midlet.
In the BlackBerry JDE, open project propertises. On Application tab, set Project Type to CLDC Application. This should then compile.
The code I gave for WebLaunch is BlackBerry specific code since it uses the BlackBerry browser objects. No need to try and make it a generic midlet, use the cldc instead.
Regards,
Eric
|
|
|
|
|
New Member
Posts: 7
Join Date: Dec 2004
Model: Pearl
Carrier: AT&T
|

11-19-2007, 10:13 AM
Eric,
Thanks for the reply. It was very helpful & i got it working
|
|
|
|
|
New Member
Posts: 7
Join Date: Dec 2004
Model: Pearl
Carrier: AT&T
|

11-19-2007, 01:55 PM
Eric,
It is working fine except that the focus does not change to the blackberry browser when using blackberry pearl. Do you know how to fix it?
Thanks,
Krishna
Last edited by kk : 11-19-2007 at 02:21 PM.
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

11-19-2007, 03:43 PM
Possible you need to check to see which browser you want to invoke. Use this link, it shows how to loop through the browsers and launch a specific one.
Livelink - Redirection
|
|
|
|
|
New Member
Posts: 7
Join Date: Dec 2004
Model: Pearl
Carrier: AT&T
|

11-21-2007, 07:46 AM
Eric,
when I do this the browser did launch but when I click hide from the menu then whole blackberry (pearl) freezes.
|
|
|
|
|
Thumbs Must Hurt
Posts: 80
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 8100
Carrier: Cingular
|

11-21-2007, 10:45 AM
humm ... dunno why that would happen. Possible post your program code.
|
|
|
|
|
New Member
Posts: 7
Join Date: Dec 2004
Model: Pearl
Carrier: AT&T
|

01-18-2008, 10:19 AM
Eric,
I am having a issue with Blackberry Pearl 8100. When I click the icon the browser app loads the application but does not get the focus so I have to manually go and click the browser button.
Can you please tell me what I am doing wrong? or How do I fix it?
Following is the code I am using
package WebLaunch;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.system.*;
import net.rim.blackberry.api.browser.Browser;
import net.rim.blackberry.api.browser.BrowserSession;
import net.rim.device.api.servicebook.ServiceRecord;
import net.rim.device.api.servicebook.ServiceBook;
import net.rim.device.api.util.StringUtilities;
public class WebLaunch extends UiApplication
{
public static void main(String[] args)
{
WebLaunch theApp = new WebLaunch();
theApp.enterEventDispatcher();
}
public WebLaunch()
{
//BrowserSession browserSession = Browser.getDefaultSession();
//browserSession.displayPage
launchBrowser("http://mobile.xxxx.com"); //or your intranet site
System.exit(0);
}
public void launchBrowser(String address) {
try {
//try to launch the default browser
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage (address);
} catch(Exception e) {
//if that fails - like usuall, find an alternate browser to launch
launchAltBrowser(address);
} finally {
}
}
public void launchAltBrowser(String address) {
String uid = null;
ServiceBook sb = ServiceBook.getSB();
//find the browser services on the device
ServiceRecord[] records = sb.findRecordsByCid("BrowserConfig");
if( records != null ) {
int numRecords = records.length;
for( int i = 0; i < numRecords; i++ ) {
ServiceRecord myRecord = records[i];
if( myRecord.isValid() && !myRecord.isDisabled() ) {
uid = myRecord.getUid();
try {
BrowserSession visit = Browser.getSession(uid);
visit.displayPage(address);
//If this config dosent work we will throw an exceptino and move on
//otherwise we will break and quit.
break;
} catch(Exception e) {
//This didnt work - move on to the next one.
}
}
}
}
}
}
|
|
|
|
|
Thumbs Must Hurt
Posts: 140
Join Date: Aug 2007
Model: 8100
PIN: N/A
Carrier: Rogers
|

01-19-2008, 01:08 PM
Just curious..maybe the thread has diverted from the original poster..
But if you have a BES why not just do a Browser Channel Push.. you push web content, and the link to a read and unread icon from the server to the BES via an HTTP POST and it shows up as an icon on the main ribbon.
When the user clicks on it, it opens their browser to that link.
BlackBerry - BlackBerry | Wireless Handheld Devices, Software & Services from Research In Motion (RIM)
|
|
|
|
|
New Member
Posts: 1
Join Date: Jan 2008
Model: 8300
PIN: N/A
Carrier: ATT
|
helloworld example may help, does this work with VZ? -
01-20-2008, 10:54 AM
The JDE helloworld example uses this code, perhaps your focus problem would be solved with this addition ( I haven't tried it as I am using code similar to yours and noted a problem with the 7130 keeping the "blackberry" logo image on the screen until I push the button ):
public HelloWorld()
{
// Push the main screen instance onto the UI stack for rendering.
pushScreen(new HelloWorldScreen());
}
}
/*package*/ final class HelloWorldScreen extends MainScreen implements HelloWorldResResource
{
Does anyone know offhand if VZ lets you load stuff with a minimum of effort? I tested my app, similar to yours but using midlet architecture, on a variety of ATT BB's and it seemed to run consistently. However, I have reports of problems loading onto VZ phones - I'll see if this is part of their walled garden but IIR they aren't alway real open about their restrictions.
Thanks.
|
|
|
|
|
New Member
Posts: 7
Join Date: Dec 2004
Model: Pearl
Carrier: AT&T
|

01-23-2008, 03:54 PM
I don't know why this started happnening lately. When I install the app OTA i get a message saying it has been successfully installed but does not show option to run nor do I see the icon on my desktop.
Any ideas?
|
|
|
|
|
New Member
Posts: 1
Join Date: Nov 2007
Model: 8800
PIN: N/A
Carrier: att
|
browser hang-up problem -
03-23-2008, 06:54 PM
Hi, I am having a problem with the following code. It successfully opens the browser but hangs up before the designated site loads. Sometimes it will load the page but it frequently fails. I am getting this problem on 8800s and Curves on both BIS and BES. For some reason, hitting the application button seems to force the browser to load the page.
Does anyone have any idea what my problem is?
/*
* mysite.java
*
* © <your company here>, 2003-2005
* Confidential and proprietary.
*/
import net.rim.blackberry.api.browser.Browser;
import net.rim.blackberry.api.browser.BrowserSession;
import net.rim.device.api.ui.UiApplication;
public class mysite extends UiApplication {
public static void main(String[] args){
mysite instance = new mysite();
instance.enterEventDispatcher();
}
public mysite() {
BrowserSession site = Browser.getDefaultSession();
site.displayPage("mysite");
System.exit(0);
}
}
Thanks in advance,
Bucky
|
|
|
|
|
New Member
Posts: 4
Join Date: Feb 2007
Model: 8700
Carrier: t-mobile
|

06-03-2008, 10:55 AM
Ive found this thread while trying to solve a problem we are experiencing atm.
Unfortunately the solution to my problem was not in here, but I want to answer some of the earlier questions:
Browser starting with empty page (8800/8300):
We have experienced this Problem on Devices using Software Version 4.2 whenever the Browser was previously closed using the red hangup key instead of the escape button or browser menu.
In this case the browser seems to stay in the background and doesnt load the page uppon reinvokation. REALLY closing the browser by escape helps as a workaround.
Browser not getting focus:
There seems to be a bug in 4.2.0 that doesnt put the browser to the foreground when its invoked.
As a workaround add the following lines:
Code:
BrowserSession browserSession = Browser.getDefaultSession();
//now launch the URL
browserSession.displayPage("http://demo.mobilezukunft.de/TelcatWEB/login.jsp");
//The following line is a work around to the issue found in
//version 4.2.0
browserSession.showBrowser();
Hope that helps whoever is crossing this thread next time
regards,
Kolja Märtens
|
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|