Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
icefrost1
Posts: 71
Registered: ‎06-26-2009
My Device: Curve 8310

Auto-run on startup not working on device

Hi

 

I'm trying to run an application on startup as a system module. I've set Auto-run on startup and System module and set Startup tier to 6. But the app appears to not be starting at all. I attached a debugger to the device, the app is signed, and I've implemented the following code:

 

 

class TestApp extends Application {
public static void main(String[] args)
{
TestApp instance = new TestApp();
instance.enterEventDispatcher();
}
public class mainThread extends Thread {
public void run() {
ApplicationManager app = ApplicationManager.getApplicationManager();
while (app.inStartup()) {
try _thread.sleep(2000);
} catch(Exception e) {
}
}

// application code goes here
}
}
public TestApp()
{
_thread = new Thread(new mainThread());
_thread.start();
}
}

 

 On startup all I see is a no sig from 0x33, which if I recall correctly means its not signed with a RIM key, just like most other apps on the device, nothing else is mentioned about the app at all.

 

Can someone help me out here please?

 

Thanks

Give kudos if somebody helps you, also mark accepted if it solves your problem. Search first, then post. Please respect RFC-1855 when posting on forums.

Please use plain text.
Developer
johnbibs
Posts: 905
Registered: ‎02-07-2009
My Device: BlackBerry Torch 9800

Re: Auto-run on startup not working on device

I'm just curious, your application runs on startup and spawns a thread to spawn another thread? What do you want to achieve here? 

 

can you also check the eventlogs for errors? to access eventlogs enter alt-lglg.

Please use plain text.
Developer
jlfernandez
Posts: 49
Registered: ‎07-06-2009
My Device: Not Specified

Re: Auto-run on startup not working on device

Are you using eclipse?
Please use plain text.
Developer
jonberry
Posts: 484
Registered: ‎07-17-2008
My Device: Not Specified

Re: Auto-run on startup not working on device

I was having this problem yesterday with JDE 4.5 and I found that rapc is not adding the runtime signature to the signing request.

 

Dont' know why that's happening...

Please use plain text.
Developer
icefrost1
Posts: 71
Registered: ‎06-26-2009
My Device: Curve 8310

Re: Auto-run on startup not working on device

Hi

 

Thanks for your input, I see the mistake on the threads, I'll fix it but it shouldn't cause any problems, just wasting a thread basically.

 

The event log just reports the same as the debugger, only it does so a few times, just the sig from 0x33 error, which I know means the app isn't made by RIM which I know to be true and should not be a problem.

 

The funny thing is if I set a breakpoint at the very beginning of the application and attach the debugger immediately once the USB comes up, it never hits the breakpoint, and I can see tiers 1, 2, 3, 4, 5, 6, 7 all passing in the debug window, I see all apps being started except mine.

 

Regards

 

Lionel

Give kudos if somebody helps you, also mark accepted if it solves your problem. Search first, then post. Please respect RFC-1855 when posting on forums.

Please use plain text.
Developer
icefrost1
Posts: 71
Registered: ‎06-26-2009
My Device: Curve 8310

Re: Auto-run on startup not working on device

No, I'm using JDE 4.2.1, app runs fine on simulator, but not device. I followed some instructions I found elsewhere on the forum for waiting on startup as you can see from my code.

 

But you got me very curious, what difference would it make if I use Eclipse? I can download it if it would fix something.

Give kudos if somebody helps you, also mark accepted if it solves your problem. Search first, then post. Please respect RFC-1855 when posting on forums.

Please use plain text.
Developer
icefrost1
Posts: 71
Registered: ‎06-26-2009
My Device: Curve 8310

Re: Auto-run on startup not working on device

I've verified using the Signature Tool that the app is signed with Runtime, Apps and Cryptography. Though I'm not using Cryptography.

Give kudos if somebody helps you, also mark accepted if it solves your problem. Search first, then post. Please respect RFC-1855 when posting on forums.

Please use plain text.
Developer
icefrost1
Posts: 71
Registered: ‎06-26-2009
My Device: Curve 8310

Re: Auto-run on startup not working on device

Hmm, thought about some more things, maybe can help in this situation:

 

My dependancies are net_rim_cldc,net_rim_bbapi_phone,net_rim_locationapi,net_rim_pdap, could it be that my app is trying to start before these have started? What tier should I be using?

 

Also saw this in the .jad file

 

RIM-MIDlet-Flags-1: 0

 

Gonna try changing it now to

 

RIM-MIDlet-Flags-1: 1

 

According to http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800660/How_To_...

Give kudos if somebody helps you, also mark accepted if it solves your problem. Search first, then post. Please respect RFC-1855 when posting on forums.

Please use plain text.