BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 11-01-2006, 12:46 AM   #1
joyhope
Knows Where the Search Button Is
 
Join Date: Oct 2006
Model: 7100T
Posts: 28
Default How to create the live icon

Please Login to Remove!

The the icon will changed in default applicaiton installed in BlackBerry phone.

The select icon is different from unselect icon.

How could I create such feature?
Offline  
Old 11-01-2006, 04:13 AM   #2
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

Code:
Bitmap _icon1 = Bitmap.getBitmapResource("icon1.png");
Bitmap _icon2 = Bitmap.getBitmapResource("icon2.png");
try {
net.rim.blackberry.api.homescreen.HomeScreen.updateIcon(_icon1);
} catch(Exception e) {
}
try {
net.rim.blackberry.api.homescreen.HomeScreen.setRolloverIcon(_icon2);
} catch(Exception e) {
}
Offline  
Old 11-01-2006, 10:02 PM   #3
joyhope
Knows Where the Search Button Is
 
Join Date: Oct 2006
Model: 7100T
Posts: 28
Default

Where to put these code?

class xxxx
{
static
{
//put the code here: A
}

void main(..)
{
//put the code here: B
...
}
}

Put the code A or B, I tried, but not working.
Offline  
Old 11-01-2006, 10:21 PM   #4
joyhope
Knows Where the Search Button Is
 
Join Date: Oct 2006
Model: 7100T
Posts: 28
Default

The icon is active, but my application has not run, so how could I add this feature.
Offline  
Old 11-02-2006, 09:40 PM   #5
joyhope
Knows Where the Search Button Is
 
Join Date: Oct 2006
Model: 7100T
Posts: 28
Default

Get the answer from RIM.

Livelink - Redirection

Got success now.
Offline  
Old 11-03-2006, 04:11 PM   #6
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

aah i understand, nice tip! - normally the rollover icon only begins to work after you've run the application once - this way the rollover will work as soon as the app is installed. thanks for finding this.
Offline  
Old 11-03-2006, 09:08 PM   #7
terrylojr
New Member
 
Join Date: Nov 2006
Location: Detroit,MI
Model: 8700
Posts: 9
Lightbulb is there ann new bb applications for 8700

can some one give me some new apps
__________________
Terry
Male/19/Detroit,Mi
pin.23DC1ABD

http://www.myspace.com/streetsrusent
http://www.myspace.com/terry313
Offline  
Old 11-03-2006, 11:55 PM   #8
Californium
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 8300
Carrier: Cingular
Posts: 35
Default

I'm trying to follow the guide myself but I'm wondering about how you can set the rollover icon and start the program without having two application icons on the home screen.


The guide mentions

Code:
public static void main(String[] args) {
     if ( args != null && args.length > 0 && args[0].equals("gui") ){
          // code to initialize the app
          theApp.enterEventDispatcher();
     } else {
          // code to launch the background thread }
     }
}

In order to pass the "gui" argument, another project with a CLDC alternate entry is needed. However, this results with two application icons on the home screen. One for the normal program and another for the alternate entry program.

If I set the main program as a system module to hide it, is there a way to set the rollover icon for the alternate entry program? Thanks.



EDIT: nvm, just had to use HomeScreen.setRolloverIcon(icon, 1);

Last edited by Californium; 11-04-2006 at 12:00 AM..
Offline  
Old 11-07-2006, 04:02 PM   #9
Californium
Knows Where the Search Button Is
 
Join Date: Aug 2006
Model: 8300
Carrier: Cingular
Posts: 35
Default

Has anyone else had problems with the rollover icon working only sometimes? I believe my problem may be due to the incorrect rollover icon index.

From the API, it mentions to look at the RAPC file... it contains

Code:
MIDlet-Name: test
MIDlet-Version: 
MIDlet-Vendor: test
MIDlet-Description: test
MIDlet-Jar-URL: test.jar
MIDlet-Jar-Size: 0
MicroEdition-Profile: MIDP-2.0
MicroEdition-Configuration: CLDC-1.1
MIDlet-1: test,img/1.png,
RIM-MIDlet-Flags-1: 3
MIDlet-2: Test Entry,img/1.png,gui
RIM-MIDlet-Flags-2: 0
If I want to set the rollover icon from the Test Entry application, do I use index 1? I seem to be getting an error of

Quote:
Uncaught exception: Module with handle[1708] and index [1] has no application entry point
On my homescreen, I still see the program as Test Entry and I can enter the program with the argument of gui. So it appears to not like the "else" section of the code.

Code:
public static void main(String[] args) {
        if ( args != null && args.length > 0 && args[0].equals("gui") ){
            // code to initialize the app
            Test theApp = new Test();
            theApp.enterEventDispatcher();
        } else {
            // Sets active icon
            Bitmap rollIcon = Bitmap.getBitmapResource("2.png");
            HomeScreen.setRolloverIcon(rollIcon, 1); 
            
            // code to launch the background thread 
            //TestThread _testThread = new TestThread();
            //_testThread .start();   
        }
    }
I have set an application icon for the alternate entry point and the main program runs at startup and is a system module.

On the simulator for the 8700 device with IDE 4.1.0, this runs fine. However, when placed on a 8700 handheld with OS 4.1.0, it only works sometimes.

Does anybody have an idea of how to fix this? Thank you.

Last edited by Californium; 11-30-2006 at 11:31 AM..
Offline  
Old 11-27-2006, 12:22 AM   #10
jsm174
Knows Where the Search Button Is
 
Join Date: Jun 2005
Model: 7290
Carrier: Cingular
Posts: 17
Default

Hello. Did you ever figure this out?

It's driving me absolutely crazy as well. I just found this post by searching for "has no application entry point".

If I run in the simulator with an index of 1, it works fine. On a real 8700, everytime I restart it, I get that message. It's extremely annoying!!

For the most part, we've followed everything the Blackberry tech note says:

Quote:
A new application programming interface (API), introduced in the BlackBerry API 4.1 set, grants the ability to add a rollover icon for an application. To leverage this new API properly, the application must run on start-up so the call is executed, and can thus take effect before the user scrolls to the application. To make sure that the application is not running needlessly in the background, the application should shut down after the call to set the rollover icon has been placed.

Complete this task with the following main method, listing rolloverIcon.png in the resources:

Code:
public static void main(String[] args){
    //check for the argument we defined in the JDE
    if (args != null && args.length > 0 && args[0].equals("gui")){
      //Start the App 
    } else { 
       Bitmap icon = Bitmap.getBitmapResource("rolloverIcon.png");
       HomeScreen.setRolloverIcon(icon); 
    }
}


They don't use an index, but I tried that as well.

Thanks,
-- Jason
Offline  
Old 04-18-2007, 09:48 AM   #11
chetan.sawant
Knows Where the Search Button Is
 
Join Date: Sep 2005
Location: Mumbai, India
Model: 8100
Carrier: Airtel
Posts: 31
Default

Any Luck?

im facing same problem for 8100.

I downloaded a sample app from BlackBerry knowledge base( Livelink - Redirection )

But this app also giving me same kind of error...

Thanks,
Chetan Sawant
Offline  
Old 05-30-2007, 03:19 PM   #12
Vorino
Knows Where the Search Button Is
 
Vorino's Avatar
 
Join Date: Aug 2006
Location: Canada
Model: All
PIN: ABBAABBA
Carrier: Rogers
Posts: 25
Default

Has anyone figured this one out yet? Under OS 4.1 it always works for me, but under OS 4.2 it never works and I get the exception. So all I've done for now is put a try block around things.

RIM gets their preloaded apps to work fine, so there must be a solution, but I don't see any hints of it in the sample apps.

Thanks,
__________________
Paul Beaulieu, Vorino Software Inc. -- http://vorino.com
Offline  
Old 09-21-2007, 07:05 AM   #13
xray2100
Knows Where the Search Button Is
 
Join Date: Nov 2006
Location: shanghai
Model: 8700G
Carrier: china mobile
Posts: 17
Default Resolve it!

Just retry several times! Following is the code:

public class HomeScreenIcon extends UiApplication
{
public static void main(String[] args) {
if(args != null && args.length > 0 && args[0].equals("gui")) {
.....
} else {
HomeScreenIcon application = new HomeScreenIcon();
application.setIcon();
application.enterEventDispatcher();
}
}

private void setIcon() {
final Bitmap icon_normal = Bitmap.getBitmapResource("1.png");
final Bitmap icon_focus = Bitmap.getBitmapResource("2.png");

invokeLater(new Runnable() {
public void run() {
ApplicationManager manager = ApplicationManager.getApplicationManager();
while (true)
{
if (manager.inStartup() == false) {
try {
HomeScreen.updateIcon(icon_normal, 1);
HomeScreen.setRolloverIcon(icon_focus, 1);
break;
} catch(Exception ex) {
}
}
try { Thread.sleep(1000); } catch (Exception iex) { }
}
System.exit(0);
}
});
}
Offline  
Old 11-16-2007, 02:59 PM   #14
mhreljac
Knows Where the Search Button Is
 
Join Date: Jul 2007
Model: 9000
PIN: N/A
Carrier: Rogers
Posts: 36
Default

Has anyone got a solution to this yet? I've tried everything over the past couple of days and it's not taking.

The KB article explains it a bit and my sample application will work after a reset (either on the simulator or actual device) -- until then, the icon has no rollover.

I basically have the application set up with the two points in the .rapc file as a 0 (normal application) and a 3 (system application, begin on startup).

My feelings are that maybe the "3" isn't the correct flag for the "RIM-MIDlet-Flags-X" field. Does anyone have a list of valid values for this field or is it just bits being set on the checkboxes (such that "1" is system library flag and "2" is the start on startup flag, so "3" is 1 and 2)?

TIA
M
Offline  
Old 04-19-2008, 05:25 AM   #15
sam.1985
New Member
 
Join Date: Dec 2007
Location: India
Model: 8820
Carrier: Airtel
Posts: 4
Thumbs up Might be a solution..

Hi All,

I have been struggling with the same issue..

"Module with handle [XXX] and index [0] has no application entry point"

I don't know the reason why it fixed the problem but I just tried and set 1 in HomeScreen.setRollover(bt, 1) method instead of HomeScreen.setRollover(bt, 0),

and it solved my problem...

Code:
public static void setRolloverIcon(){
        //PNG Image MUST be added to project befor compile.
        //on same folder
        net.rim.device.api.system.Bitmap bt = net.rim.device.api.system.Bitmap.getBitmapResource("com/icon/currency28.png");
        net.rim.blackberry.api.homescreen.HomeScreen.setRolloverIcon(bt, 1 );
    }
    
    public static void main(String[] args) {
        try{
            if (args!=null && args.length > 0 && args[0]!=null && args[0].equals("gui")){
                IconApp app = new IconApp();
                app.openBrowser();
            }else{
                try{
                    setRolloverIcon();
                }catch(Exception ex){
                    System.out.println("Exception :"+ex);
                }
                System.exit(0);
            }
        }catch(Exception ex){
            System.out.println("Exception : "+ex.getMessage());
        }
    }
Now I am able to make an alternate entry point as well as set the rollover icon. And the good part is, it didn't require to resent the device...

One note I would like to put forward...I have just tested this application on various simulators like 7100g, 7100i, 7100r, 7100t, 7100v,7100x, 7105t, 7130e, 7130e-v, 7250, 7290, 7520, 8700c, 8700r, 8703e, 8800, 8100 (Pearl) and 8300 (Curve).. So I suppose, this should also work on the device itself.. However I am waiting for my code signing keys to be delivered to me and soon will test on devices..

good luck.

Thanks
__________________
~Sameer

Last edited by sam.1985; 04-19-2008 at 05:27 AM..
Offline  
Old 06-14-2008, 04:34 AM   #16
ralfmb
New Member
 
Join Date: Jun 2008
Model: 8800
PIN: N/A
Carrier: T-Mobile
Posts: 1
Default Create a live icon (rollover icon) on 8800 device

So, after trying hard all proposals from this thread (without success!), I finally found a working solution for my BB 8800:

Here is the code:

...

public static void main(String[] args)
{
ApplicationManager manager = ApplicationManager.getApplicationManager();
if (manager.inStartup() == true) {
// app is in startup
final Bitmap icon = Bitmap.getBitmapResource("normal_icon.png");
final Bitmap iconover = Bitmap.getBitmapResource("over_icon.png");

HomeScreen.updateIcon(icon, 0);
HomeScreen.setRolloverIcon(iconover, 0);
System.exit(0);
}

// here comes the regular stuff...
MainApp theApp = new MainApp();
theApp.enterEventDispatcher();
}

....

Additionally, you have to set 'Auto-run on startup' tick, no arguments to be passed to main!
That works!
regards,

Ralf
Offline  
Old 07-28-2008, 01:22 AM   #17
7100simpleisbetter
Talking BlackBerry Encyclopedia
 
7100simpleisbetter's Avatar
 
Join Date: Mar 2005
Model: 8120
PIN: Cushion
Carrier: TMobile
Posts: 355
Default

Quote:
Originally Posted by ralfmb View Post
ApplicationManager manager = ApplicationManager.getApplicationManager();
if (manager.inStartup() == true) {
// app is in startup
final Bitmap icon = Bitmap.getBitmapResource("normal_icon.png");
final Bitmap iconover = Bitmap.getBitmapResource("over_icon.png");

HomeScreen.updateIcon(icon, 0);
HomeScreen.setRolloverIcon(iconover, 0);
System.exit(0);
}

Additionally, you have to set 'Auto-run on startup' tick, no arguments to be passed to main!
That works!
regards,

Ralf
I just thought I would throw in a note that this worked for me as well. Make sure you restart your device (battery pull) or simulator while testing as it doesn't appear to be working until you reset.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Schneider Electric Energy Server EBX510 Server For Energy Management- picture

Schneider Electric Energy Server EBX510 Server For Energy Management-

$4350.00



MEDIA SERVER DOLBY IMS2000 MSIP-REM-DIB-IMS2000 picture

MEDIA SERVER DOLBY IMS2000 MSIP-REM-DIB-IMS2000

$799.99



Weidmüller WI-MOD-945-E (6720005015) Wireless Ethernet & Serial Device Server picture

Weidmüller WI-MOD-945-E (6720005015) Wireless Ethernet & Serial Device Server

$129.99



Schneider Electric Energy Server EBX510 Server For Energy Management picture

Schneider Electric Energy Server EBX510 Server For Energy Management

$865.64



Dks Doorking 1830-185 TCP/IP to Server Kit  picture

Dks Doorking 1830-185 TCP/IP to Server Kit

$120.00



Axis Q7900 14 Slot Video Server Rack Chassis,Axis 0287-004 picture

Axis Q7900 14 Slot Video Server Rack Chassis,Axis 0287-004

$230.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.