×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    19

    Event Notification

    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.

  2. #2
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: Event Notification

    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
    Pankaj Nathani
    www.croozeus.com

  3. #3
    Registered User
    Join Date
    Jul 2008
    Posts
    19

    Re: Event Notification

    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

  4. #4
    Nokia Developer Moderator
    Join Date
    May 2007
    Location
    21.46 N 72.11 E
    Posts
    3,796

    Re: Event Notification

    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
    Pankaj Nathani
    www.croozeus.com

  5. #5
    Registered User
    Join Date
    Jul 2008
    Posts
    19

    Re: Event Notification

    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

  6. #6
    Super Contributor
    Join Date
    Mar 2003
    Location
    Espoo, Finland
    Posts
    976

    Re: Event Notification

    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

  7. #7
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Event Notification

    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.

  8. #8
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Event Notification

    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

  9. #9
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Event Notification

    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.

  10. #10
    Super Contributor
    Join Date
    Oct 2007
    Location
    Deva, Romania
    Posts
    3,471

    Re: Event Notification

    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.

  11. #11
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Event Notification

    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.

  12. #12
    Registered User
    Join Date
    Jun 2005
    Posts
    386

    Re: Event Notification

    @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.

  13. #13
    Registered User
    Join Date
    Jul 2008
    Posts
    19

    Re: Event Notification

    yeah
    u are right
    using e32.ao_sleep() is saving more batter than e32.ao_sleep().
    Thanks alot guys

Similar Threads

  1. Calender event notification
    By TheLittleBird in forum Symbian
    Replies: 4
    Last Post: 2011-05-03, 08:14
  2. CLogEvent problem
    By silviuccia in forum Symbian
    Replies: 2
    Last Post: 2006-12-22, 15:28
  3. pc event notification via mob (batch file)
    By F55 in forum Mobile Java General
    Replies: 0
    Last Post: 2006-06-27, 18:45
  4. Event notification for CAknAppUi
    By rkuppala in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2003-06-07, 01:45
  5. Event notification on receiving SMS/ CALL on Nokia Handset
    By Nokia_Archive in forum General Messaging
    Replies: 1
    Last Post: 2002-05-22, 18:33

Posting Permissions

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