Hi,
I need to developp an application (without UI), which run in the background of the mobile and do an action every x seconds.
i need to use "Push Registry" o is there a way more easly ?
Thanks you for your help.
Hi,
I need to developp an application (without UI), which run in the background of the mobile and do an action every x seconds.
i need to use "Push Registry" o is there a way more easly ?
Thanks you for your help.
Hi there,
You can make a console application without any GUI. And can do anything you'd like to do while application is running in the background.
Checkout the following link:
http://wiki.forum.nokia.com/index.php/Gui_vs_Console
And also check out this sample, which will tell you how you can make the BG process work check for events etc.
http://wiki.forum.nokia.com/index.ph...e_%28Server%29
Update: Sorry, my bad. I didn't noticed in which forum the question was posted.
Hope it helps,
// chall3ng3r //
Last edited by chall3ng3r; 2008-08-27 at 11:46.
Faisal Iqbal (skype: chall3ng3r)
Flash Mobile Specialist | Orison Technologies
_____________________________________
blog: F·L·A·S·H·I·S·M
swf2go: www.swf2go.com
i want to do it in Java not in C++
I don't want to catch event, i want only a timer which run in background.
using display.setCurrent(null); is it good ?
Hi,
You can run MIDlet in background or more precise without GUI, It was working in my Series 40 devices. But while running app in the background dosnt mean u can run other application in foreground, any other application will not execute( I have checked it on Series 40 but not sure abt S60). Actually this is based on multiprocessing . Since Symbian supports multiprocessing, it could work on Symbian device like S60 and higher end and some SonyE.
anjan
Hi gregb34,
As I told you, you can run only one application at a time in series 40, it may be non GUI. You may try with display.setCurrent(null); by preparing very basic MIDlet.
Regarding PushRegistry:
this code may help you (I am not sure about Nokia series 40), try it on S60 and SE-->
class Register extends Thread
{
public Register()
{
}
public void run()
{
try {
System.out.println("+");
PushRegistry.registerConnection("autostart://:", "AutoStart", "*");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
and call this thread from ur MIDlet by:
new Register().start();
you will get details on:
http://developers.sun.com/mobility/m...icles/pushreg/
hope it will help
with Push Registry can i setup an alarm to make an action every x secondes ? because, i have see an alarm functionnality.
Focus on This
Code:/** * Schedule this MIDlet's launch. * @param deltatime the length of time in * milliseconds before expiration. */ private void scheduleMIDlet(long deltatime) throws ClassNotFoundException, ConnectionNotFoundException, SecurityException { String cn = this.getClass().getName(); // Get the current time by calling Date.getTime() Date alarm = new Date(); long t = PushRegistry.registerAlarm(cn, alarm.getTime()+deltatime); }
Rest is in:
http://developers.sun.com/mobility/m...icles/pushreg/
Y
Hi,
In Your J2ME Suit, Create two classes,
One class - your main functionality,
Second- your Push Reg Timer.
(both can be in one file).
The PR Class will operate your First class.. by setting :
Bare in mind - TO have Push Reg works - the classes must be in the same suit. - Same jar file. if its not on your plans to have it list this, then use SOCKET \ DATAGRAM connections and define TIMER & TASKER.Code:PushRegistry.registerAlarm(FIRSTCLASS,alarm.getTime()+deltatime);
Y