You should probably read a little bit more about receivers, services before integrating all these things. You cannot directly call a method in your activity from within a service.
On Thu, Oct 14, 2010 at 4:34 PM, A N K ! T <[email protected]>wrote: > hey kumar...again i am in a problem > > now i am using a service which notify when locationchange occure.. > but i am not getting how to show that location on map...as am calling the > draw method of activity from service..than it is causing nullpointer > exception... > how to show the location change on map if activity is open... > > On Thu, Oct 14, 2010 at 1:17 PM, Kumar Bibek <[email protected]> wrote: > >> Then you should go for a service which gets the location at regular >> intervals and sends it to your server. >> >> On Thu, Oct 14, 2010 at 1:16 PM, A N K ! T <[email protected]>wrote: >> >>> @Kumar Bibek >>> yes i agreed with you...but my question was that if phone >>> reboot or my app forced closed.. >>> than my app will not get notify to location change.. >>> but i need to send some data to server after each location change even >>> if my application activity is not in the front. >>> >>> >>> On Thu, Oct 14, 2010 at 10:23 AM, Kumar Bibek <[email protected]>wrote: >>> >>>> If you want an instant fix, query for the Last know location. This >>>> obviously won't work always, if you are travelling in a jet. >>>> Eventually, you will have to wait for a GPS or Network fix. And after >>>> boot, if the last know location is cleared off, you really don't have >>>> any other option than to wait for a fix. You also might think about >>>> caching the last known location in your app. >>>> >>>> On Oct 13, 5:05 pm, "A N K ! T" <[email protected]> wrote: >>>> > hey mark ...thanks a lot...i did that application and it is showing >>>> exact >>>> > locations.. one thing that remaining is after restarting of >>>> mobile...or >>>> > after getting my application close.. >>>> > it is not getting notify on location changed.....so wot to do for that >>>> > thanks agarin.. >>>> > >>>> > On Wed, Oct 13, 2010 at 4:45 PM, Mark Murphy <[email protected] >>>> >wrote: >>>> > >>>> > >>>> > >>>> > > On Wed, Oct 13, 2010 at 5:51 AM, A N K ! T < >>>> [email protected]> >>>> > > wrote: >>>> > > > am trying to develop an app that show current location. >>>> > >>>> > > > but i am having one prob. my application is showing location on >>>> location >>>> > > > change occur. >>>> > > > but how to show location first time. >>>> > > > i want to take location manually..not by onlocationchange Method >>>> in >>>> > > location >>>> > > > manager >>>> > > > wot to do? >>>> > >>>> > > There is no "current location" most of the time. For example, the >>>> GPS >>>> > > radio is normally off, to save power. Please wait for the first fix >>>> to >>>> > > arrive to your LocationListener. >>>> > >>>> > > -- >>>> > > Mark Murphy (a Commons Guy) >>>> > >http://commonsware.com|http://github.com/commonsguy >>>> > >http://commonsware.com/blog|http://twitter.com/commonsguy<http://commonsware.com/blog%7Chttp://twitter.com/commonsguy> >>>> > >>>> > > _The Busy Coder's Guide to Android Development_ Version 3.1 >>>> Available! >>>> > >>>> > > -- >>>> > > You received this message because you are subscribed to the Google >>>> > > Groups "Android Developers" group. >>>> > > To post to this group, send email to >>>> [email protected] >>>> > > To unsubscribe from this group, send email to >>>> > > [email protected]<android-developers%[email protected]> >>>> <android-developers%[email protected]<android-developers%[email protected]> >>>> > >>>> > > For more options, visit this group at >>>> > >http://groups.google.com/group/android-developers?hl=en >>>> > >>>> > -- >>>> > >>>> > A N K ! T...... >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Android Developers" group. >>>> To post to this group, send email to >>>> [email protected] >>>> To unsubscribe from this group, send email to >>>> [email protected]<android-developers%[email protected]> >>>> For more options, visit this group at >>>> http://groups.google.com/group/android-developers?hl=en >>>> >>> >>> >>> >>> -- >>> >>> A N K ! T...... >>> >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected]<android-developers%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >>> >> >> >> >> -- >> Kumar Bibek >> http://techdroid.kbeanie.com >> http://www.kbeanie.com >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > -- > > A N K ! T...... > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

