×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Nov 2005
    Posts
    9

    Location Log Application

    Hi All!

    I develop simple Location Log application.
    If e:\\Sounds\simple\Message.wav present and current cell changed sound played and on screen print location info. I use "O-o" sound from ICQ (on PC C:\Program Files\ICQ[xxxx]\Sounds\Message.wav).
    Is possible Sound On or Sound Of in menu.

    If sound file not found application run without sound notifications.

    Code:
    #Location Log
    #Bogdan Znakharenko
    import audio
    import location
    import appuifw
    import e32
    
    class LocationInformerApp:
        def __init__(self):
            self.lock=e32.Ao_lock()
            self.exitflag = 0
            self.SoundEnabled = True
            self.old_exit_key_handler=appuifw.app.exit_key_handler
            self.old_app_body=appuifw.app.body
            appuifw.app.exit_key_handler=self.set_exit
            appuifw.app.title = u'LocationInfo'
            try:
                self.mysound = audio.Sound.open(u'e:\\Sounds\simple\Message.wav')
                self.mysound.play()
            except:
                valore = appuifw.note(u'Sound file not found!', 'info' )
                self.SetSoundOff()
            self.CreateMainMenu()
    
            
        def SetSoundOn(self):
            self.SoundEnabled = True
            appuifw.app.title = u'LocationInfo [O]'
        def SetSoundOff(self):
            self.SoundEnabled = False
            appuifw.app.title = u'LocationInfo [x]'
        def PlaySound(self):
            if self.SoundEnabled and self.mysound.state() <> audio.ENotReady and self.mysound.state() <> audio.EPlaying:
                self.mysound.play()
    
        def set_exit(self):
            self.mysound.close()
            appuifw.app.body = self.old_app_body
            self.exitflag=1
        def CreateMainMenu(self):
            if self.SoundEnabled:        
                appuifw.app.menu = [(u'Sound On',self.SetSoundOn),(u'Sound Off',self.SetSoundOff),(u'Exit',self.set_exit)]
            else:
                appuifw.app.menu = [(u'Exit',self.set_exit)]
                                
        def run(self):
            print u'*** Location Log ***'
            prevLoc = u''
            while not self.exitflag:
                if prevLoc <> location.gsm_location():
                    print location.gsm_location()
                    self.PlaySound()
                prevLoc = location.gsm_location()
                e32.ao_sleep(0.1)
            
    
    
    appuifw.app.screen='normal'
    lapp=LocationInformerApp()
    lapp.run()

  2. #2
    Registered User
    Join Date
    Jan 2006
    Posts
    11

    Re: Location Log Application

    could you tell me indetail about the import location and the other clas?

    wer would i find it? and will the application work on nokia 3310,1100,sony ericsson T290 etc?

    help me out

    Warm Regards,
    Prashanth Govindan

  3. #3
    Registered User
    Join Date
    Jan 2006
    Posts
    11

    Re: Location Log Application

    i meant these,

    import audio
    import location
    import appuifw
    import e32


    how do i creater them or wer can i find them?

    and please specify the phones in which this api can be used?

    Cheers,
    Prashanth

  4. #4
    Registered User
    Join Date
    Nov 2005
    Posts
    9

    Re: Location Log Application

    Quote Originally Posted by pheshu
    could you tell me indetail about the import location and the other clas?

    wer would i find it? and will the application work on nokia 3310,1100,sony ericsson T290 etc?

    help me out

    Warm Regards,
    Prashanth Govindan
    import connect to your script modules with specific functions which allow access to "native" phone API or special features.

    Some modules documented in Python http://python.org/ documentation, some (platform & phone specific) in forum.nokia.com http://www.forum.nokia.com/info/sw.n...ALPHA.pdf.html

    Python worked only on S60 phones (Nokia smartphones), not on 3310, 1100, sony ericsson or others. Maybe in future vendors develop Python support for other platforms, but I think this is very problematically.

    You ask me (email) about send SMS with location info. Yes, its possible. Use messaging module.

    "messaging Module
    The messaging module offers APIs to messaging services. Currently, the messaging module has one function:
    sms_send(recipient, message)
    Sends an SMS message with body text message (Unicode) to telephone number recipient (string)."

    If You have question ask me, I try find answers

  5. #5
    Registered User
    Join Date
    Jan 2006
    Posts
    11

    Re: Location Log Application

    Quote Originally Posted by bodya
    import connect to your script modules with specific functions which allow access to "native" phone API or special features.

    Some modules documented in Python http://python.org/ documentation, some (platform & phone specific) in forum.nokia.com http://www.forum.nokia.com/info/sw.n...ALPHA.pdf.html

    Python worked only on S60 phones (Nokia smartphones), not on 3310, 1100, sony ericsson or others. Maybe in future vendors develop Python support for other platforms, but I think this is very problematically.

    You ask me (email) about send SMS with location info. Yes, its possible. Use messaging module.

    "messaging Module
    The messaging module offers APIs to messaging services. Currently, the messaging module has one function:
    sms_send(recipient, message)
    Sends an SMS message with body text message (Unicode) to telephone number recipient (string)."

    If You have question ask me, I try find answers
    hi bodya,

    thanks for replying, i Hope i m half way through with my Project

    let me check if i got you right,

    by using the messaging module itself i can send location info[cell tower info] via sms. and there wouldnt be any need for the python platform.

    If so,how to pull in the location info in to the messaging module?

    should i use any specific modules to retrieve the location into the messaging module,if so please guide me

    Cheers,
    Prashanth Govindan

  6. #6
    Registered User
    Join Date
    Nov 2005
    Posts
    9

    Re: Location Log Application

    Simple change print location.gsm_location() for sms_send(recipient, location.gsm_location()), also add import messaging.

    May be I cant understand You correctly? My English is not perfect

  7. #7
    Registered User
    Join Date
    Jan 2006
    Posts
    11

    Re: Location Log Application

    Many thanks for telling me about it

    i did understand it well and i guess i m 95% through with my Project

    thankyou very much. your English is very good, u have answered crystal clear

    i have 1 more query, can i install this code on any cell examples nokia 1100,nokia 3310 etc??? or should i install it only on s40 and s60 phones?

    do i need any files installed on to the phone, like the class files etc?

    and if i want to include a timer in the code,which would send the sms[location info] every 60 sec to a predefined number, what utility or statement should i use?

    Many thanks again,

    Cheers,
    Prashanth Govindan

  8. #8
    Registered User
    Join Date
    Feb 2006
    Posts
    1

    Re: Location Log Application

    Quote Originally Posted by pheshu
    Many thanks for telling me about it

    i did understand it well and i guess i m 95% through with my Project

    thankyou very much. your English is very good, u have answered crystal clear

    i have 1 more query, can i install this code on any cell examples nokia 1100,nokia 3310 etc??? or should i install it only on s40 and s60 phones?

    do i need any files installed on to the phone, like the class files etc?

    and if i want to include a timer in the code,which would send the sms[location info] every 60 sec to a predefined number, what utility or statement should i use?

    Many thanks again,

    Cheers,
    Prashanth Govindan
    Dear Prashanth

    I am a newbie to this. I am interested to do the same on 7250. Please provide me with code.

    Thanks a lot

    Best Regards

    Amar

  9. #9
    Registered User
    Join Date
    Nov 2005
    Posts
    9

    Re: Location Log Application

    Quote Originally Posted by pheshu
    Many thanks for telling me about it

    i did understand it well and i guess i m 95% through with my Project

    thankyou very much. your English is very good, u have answered crystal clear

    i have 1 more query, can i install this code on any cell examples nokia 1100,nokia 3310 etc??? or should i install it only on s40 and s60 phones?

    do i need any files installed on to the phone, like the class files etc?

    and if i want to include a timer in the code,which would send the sms[location info] every 60 sec to a predefined number, what utility or statement should i use?

    Many thanks again,

    Cheers,
    Prashanth Govindan
    As I write early on this forum thread: "Python worked only on S60 phones (Nokia smartphones), not on 3310, 1100, sony ericsson or others. Maybe in future vendors develop Python support for other platforms, but I think this is very problematically."

    Yes, You must install Python support (by other worlds - Framework or engine) on S60 phone for run Python scripts.

    Simplest way is increase delay in main cycle e32.ao_sleep(0.1), but I think it is not best method. Better solution write all location changes with small delay and after timeout analize this info and send SMS if location is realy change (no random jump to other cell). This is for decrease amount of sended SMS and money.

  10. #10
    Registered User
    Join Date
    Feb 2006
    Posts
    8

    Re: Location Log Application

    hey frnz need some help wanna know how to retrive cell info display using J2ME ... or should i use this code nd cross compile ... does this code works on th mobile whn made into a JAR file ... plz help
    thankx ... AmRiT

Similar Threads

  1. Auto Start of the application
    By S.S.Sudhakar in forum Symbian
    Replies: 19
    Last Post: 2008-09-25, 02:16
  2. Java Application Provisioning ove BT
    By a_n_k_u_r in forum Bluetooth Technology
    Replies: 3
    Last Post: 2006-06-23, 08:48
  3. problem with location API in 6630
    By lakshmanraob in forum General Development Questions
    Replies: 0
    Last Post: 2005-09-21, 15:02
  4. Replies: 3
    Last Post: 2005-09-16, 03:37
  5. Replies: 0
    Last Post: 2005-05-28, 10:20

Posting Permissions

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