You Are Here:

Community: Developer Discussion Boards

#1 Old Event Notification - 2008-07-07, 06:02

Join Date: Jul 2008
Posts: 19
alancupid
Offline
Registered User
Hi..
I am doing an mini GPS coordination by checking the cellid and i rename the cell name in a database. The project works such away that, it vibrates or rings whenever the cellid changes.

Currently now i m using normal looping by checking the cellid every 5 seconds, however, it is very battery consuming and not practical.

Is that anyway to improve this? I am thinking whether using Ao_lock.wait() or refresh to listen on the changing of cellid.
Any idea of this ?


Thanks a lot.
Reply With Quote

#2 Old Re: Event Notification - 2008-07-07, 06:15

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Hi and welcome to Pys60 Dibo !

Changing the granularity of checking the cell id may help.

You can make a check on the current cell-id every minute rather than 5 seconds. Or you may even try to keep this customizable and user dependent, so that the user may choose according to his wish.
(You may notify the user that the battery may be drained away if he chooses low intervals)

Ao_lock.wait() would not refersh the cellid !

Br,
Croozeus
Reply With Quote

#3 Old Re: Event Notification - 2008-07-07, 06:41

Join Date: Jul 2008
Posts: 19
alancupid
Offline
Registered User
OO.. ic
i wonder what is this two functions notice in the new feature of 1.3.1 of Python

# Focus-event notification
# New Active Object timer service

I tried to search but could not get any documentation
Reply With Quote

#4 Old Re: Event Notification - 2008-07-07, 06:52

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by alancupid View Post
OO.. ic
i wonder what is this two functions notice in the new feature of 1.3.1 of Python

# Focus-event notification
# New Active Object timer service

I tried to search but could not get any documentation
I guess you got these two from Nokia Opensource website.

Pys60 1.3.1 was long time ago in 2006. The current version is PyS60 1.4.4 and is available at sourceforge.

Links : Pys60 1.4.4

Best Regards,
Croozeus
Reply With Quote

#5 Old Re: Event Notification - 2008-07-07, 07:22

Join Date: Jul 2008
Posts: 19
alancupid
Offline
Registered User
Yeah
i aware that the newest version is 1.4.4
In there, i still can't find about these two features too..:P wondering wat is these two features contribute to the version
Reply With Quote

#6 Old Re: Event Notification - 2008-07-07, 14:03

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by alancupid View Post
# Focus-event notification
You get event when your app loses or gets focus. Won't help at all with cellid.

Quote:
Originally Posted by alancupid View Post
# New Active Object timer service
You create your own timer and define WHEN do you want to do something. You could define to wait for 5 secs and get an event after that. There you could check whether cellid is still same as last time. Btw every time you can define a new/different timeout period.

For timers I have nice sample code

http://jouni.miettunen.googlepages.com/timersample

Cheers,

--jouni
Reply With Quote

#7 Old Re: Event Notification - 2008-07-07, 15:34

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
Quote:
Originally Posted by alancupid View Post
Hi..
I am doing an mini GPS coordination by checking the cellid and i rename the cell name in a database. The project works such away that, it vibrates or rings whenever the cellid changes.
Currently now i m using normal looping by checking the cellid every 5 seconds, however, it is very battery consuming and not practical.
hi alancupid
if you want to have an activity based on the change of the cellid
its certain that you have to check the cellid the battery optimization can be done by extending the time or providing a control to the user to refresh it.
hope that helps you
feel free for a feedback.


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#8 Old Re: Event Notification - 2008-07-07, 15:42

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Quote:
Originally Posted by gaba88 View Post
hi alancupid
if you want to have an activity based on the change of the cellid
its certain that you have to check the cellid the battery optimization can be done by extending the time or providing a control to the user to refresh it.
hope that helps you
feel free for a feedback.
Hi Gargi,

As you can see the exact same solution has already been suggested. There's no point in repeating it

Quote:
Originally Posted by croozeus View Post
Hi and welcome to Pys60 Dibo !

Changing the granularity of checking the cell id may help.

You can make a check on the current cell-id every minute rather than 5 seconds. Or you may even try to keep this customizable and user dependent, so that the user may choose according to his wish.
(You may notify the user that the battery may be drained away if he chooses low intervals)

Ao_lock.wait() would not refersh the cellid !

Br,
Croozeus
Reply With Quote

#9 Old Re: Event Notification - 2008-07-07, 15:48

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
hi bogdan
thanks for reminding me buddy but i have a different point in my reply that you were not able to notice
i.e. you have to use the looping method and no other solution is available.
hope now the post is a different one from that of croozeus.


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#10 Old Re: Event Notification - 2008-07-07, 15:54

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
Offline
Forum Nokia Champion
Quote:
Originally Posted by gaba88 View Post
hi bogdan
thanks for reminding me buddy but i have a different point in my reply that you were not able to notice
i.e. you have to use the looping method and no other solution is available.
hope now the post is a different one from that of croozeus.
Actually you didn't mention that looping is the only solution. Come to think of it, you didn't mention looping at all. Maybe you meant to but forgot.
Reply With Quote

#11 Old Re: Event Notification - 2008-07-07, 16:02

Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
Send a message via Yahoo to gaba88 Send a message via Skype™ to gaba88
gaba88's Avatar
gaba88
Offline
Forum Nokia Champion
hi bogdan again
and really thanks again this time if i havent mentioned that looping is the only method than i mentioned it in the earlier post so its all now i think.
hope you have some other solution to alancupid
BTW thanks again.


Gargi Das- http://gargidas.blogsot.com

Forum Nokia Python Wiki


Learn Python at http://mobapps.org/PyS60
Reply With Quote

#12 Old Re: Event Notification - 2008-07-07, 22:05

Join Date: Jun 2005
Posts: 382
y.a.k
Offline
Regular Contributor
@alancupid

You haven't said how do you wait inside the loop. If you've used time.sleep() you may want to switch to e32.ao_sleep(). If you allready use this, I doubt switching to e32.Ao_timer() would improve battery usage a lot.
Reply With Quote

#13 Old Re: Event Notification - 2008-07-09, 12:40

Join Date: Jul 2008
Posts: 19
alancupid
Offline
Registered User
yeah
u are right
using e32.ao_sleep() is saving more batter than e32.ao_sleep().
Thanks alot guys
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
Calender event notification TheLittleBird General Symbian C++ 1 2007-02-28 07:49
CLogEvent problem silviuccia General Symbian C++ 2 2006-12-22 16:28
pc event notification via mob (batch file) F55 Mobile Java General 0 2006-06-27 19:45
Event notification for CAknAppUi rkuppala Symbian Tools & SDKs 3 2003-06-07 02:45
Event notification on receiving SMS/ CALL on Nokia Handset Nokia_Archive General Messaging 1 2002-05-22 19:33

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia