12-03-2010 05:49 AM - edited 12-03-2010 08:46 AM
I do not know who to ask if I have question about knowledge base articles so I'm going to post it here.
I want to push alert dialog box like how integrated calendar alerts users. I understand that I need to make use of globalevents and listeners so I've been studying it from knowledge base article below:
However, when I run the code, it does not do anything. The way it is set up, it should be displaying the messages ("event received, sending acknowledgement and acknowledgement received") but nothing happens on my simulator once I "fire" the global event. Please help!!!
Solved! Go to Solution.
12-03-2010 09:41 AM
Post a sample of your code so we can see what you're doing wrong. Since you're saying it doesn't work (and only that), we can't determine why it doesn't.
12-03-2010 09:43 AM
The code I used is exactly same as the one from KB. I just copied and pasted it.
I don't know why the texts are not appearing since I've everything makes sense. If you build based on the codes from KB, does it work?
12-03-2010 09:51 AM
Are you loading both applications to the simulator or device or just one?
Were they built as separate apps?
12-03-2010 09:55 AM
The two java classes are under one package com.samples.GlobalEventFiring and only one of the classes (GlobalEventFiring.java) pushes mainScreen so I just built that one onto simulator. Is it not how I'm suppose to build it?
I'm really a n00b developer so I need some assistance
12-03-2010 10:36 AM - edited 12-03-2010 10:36 AM
No problem. We were all there at one point.
Each one of those files has a main method which is your entry point to the application. Since each one has one, they both need to have their own projects.
So create a new project for each of those files in Eclipse (or JDE; Eclipse preferred) and drop the code in. then run both projects on the simulator.
Once both applications are on the sim, you can then show the interaction between both applications.
12-03-2010 10:44 AM
By the way, is there any way for the app to be not running and still listen in and catch the global event?
12-03-2010 11:48 AM
12-03-2010 11:50 AM
If an instance is always running, wouldn't that have huge impact on batter life? Is that how all the other apps do it? Have the app run on background?
12-03-2010 11:59 AM