|
|
|
10-24-2006, 04:16 PM
|
#1
|
Thumbs Must Hurt
Join Date: Oct 2006
Location: nYc & CT
Model: 8820
Carrier: AT&T/Sprint/Nextel
Posts: 186
|
Broswer-Based Push Application Help!
Please Login to Remove!
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"
|
Offline
|
|
10-24-2006, 11:50 PM
|
#2
|
Thumbs Must Hurt
Join Date: Aug 2005
Location: Upul Bandara from Colombo Sri Lanka -----------------------------
Model: 7290
Carrier: Dialog
Posts: 153
|
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
|
Offline
|
|
10-25-2006, 05:38 AM
|
#3
|
CrackBerry Addict
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
|
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
|
Offline
|
|
10-25-2006, 05:44 AM
|
#4
|
CrackBerry Addict
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
|
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);
}
}
}
}
|
Offline
|
|
10-26-2006, 09:59 AM
|
#5
|
Thumbs Must Hurt
Join Date: Oct 2006
Location: nYc & CT
Model: 8820
Carrier: AT&T/Sprint/Nextel
Posts: 186
|
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..
|
Offline
|
|
11-02-2006, 04:29 PM
|
#6
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
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 04:48 PM..
|
Offline
|
|
11-02-2006, 05:01 PM
|
#7
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
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 05:08 PM..
|
Offline
|
|
11-09-2006, 10:22 AM
|
#8
|
New Member
Join Date: Apr 2006
Model: 7250
Posts: 2
|
This works great but how do you stop it from reloading the web page each time you run the app?
|
Offline
|
|
11-09-2006, 11:50 AM
|
#9
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
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.
|
Offline
|
|
12-07-2006, 09:49 AM
|
#10
|
New Member
Join Date: Jun 2006
Model: 7290
Posts: 9
|
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,
|
Offline
|
|
12-07-2006, 10:53 AM
|
#11
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
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
|
Offline
|
|
12-28-2006, 10:45 AM
|
#12
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
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
|
Offline
|
|
04-19-2007, 07:41 AM
|
#13
|
New Member
Join Date: Jul 2006
Model: 8100
Carrier: Cingular
Posts: 7
|
browser app
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?
|
Offline
|
|
04-19-2007, 11:22 AM
|
#14
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
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.
|
Offline
|
|
04-19-2007, 07:00 PM
|
#15
|
New Member
Join Date: Jul 2006
Model: 8100
Carrier: Cingular
Posts: 7
|
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?
|
Offline
|
|
05-01-2007, 03:02 PM
|
#16
|
Knows Where the Search Button Is
Join Date: Sep 2005
Location: Princeton, NJ
Model: 9800
OS: Windows 7
Carrier: AT&T/Cingular
Posts: 48
|
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
|
|
Offline
|
|
05-01-2007, 04:19 PM
|
#17
|
Talking BlackBerry Encyclopedia
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
|
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.
|
Offline
|
|
05-03-2007, 08:20 AM
|
#18
|
Knows Where the Search Button Is
Join Date: Sep 2005
Location: Princeton, NJ
Model: 9800
OS: Windows 7
Carrier: AT&T/Cingular
Posts: 48
|
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
|
|
Offline
|
|
05-03-2007, 11:05 AM
|
#19
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
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
|
Offline
|
|
05-03-2007, 11:07 AM
|
#20
|
Thumbs Must Hurt
Join Date: Apr 2005
Location: Portland, OR., USA
Model: 9800
Carrier: AT&T
Posts: 82
|
Thanks for the tip, batrad.
|
Offline
|
|
|
|