09-24-2009 09:01 AM
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.
09-25-2009 01:44 AM
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.
09-25-2009 03:41 AM
09-25-2009 10:41 AM
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...
09-25-2009 11:06 AM
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.
09-25-2009 11:08 AM
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.
09-25-2009 11:09 AM
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.
09-25-2009 11:25 AM
Hmm, thought about some more things, maybe can help in this situation:
My dependancies are net_rim_cldc,net_rim_bbapi_phone,net_rim_locationa
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/li
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.