| Reply | « Previous Thread | Next Thread » |
|
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. |
|
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 |
|
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 |
|
Quote:
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 |
|
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 |
|
You get event when your app loses or gets focus. Won't help at all with cellid.
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 |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Offline
Forum Nokia Champion
|
|
|
Quote:
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 |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
||
|
Quote:
As you can see the exact same solution has already been suggested. There's no point in repeating it ![]() Quote:
|
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
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 |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
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.
|
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
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 |
|
@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. |
|
yeah
u are right using e32.ao_sleep() is saving more batter than e32.ao_sleep(). ![]() Thanks alot guys ![]() |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| 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 |