so should i send a broadcast from activity ..
but i want to send broadcast every time a gps location changed not only when
my app in background and i dont want to service running in background.
how to do it.


On Tue, Oct 12, 2010 at 4:53 PM, Mark Murphy <[email protected]>wrote:

> There is no android.intent.action.LOCATION_CHANGED in Android. Use
> requestLocationUpdates() to arrange to have location updates delivered
> to your BroadcastReceiver.
>
> On Tue, Oct 12, 2010 at 7:18 AM, A N K ! T <[email protected]>
> wrote:
> > i have created a broadcast receiver registered it statically..
> > it is not get called on location changed
> > have a look on code snippet
> > and help me out to solve the issu..
> >
> > public class LocationReceiver extends BroadcastReceiver{
> >
> >     @Override
> >     public void onReceive(Context context, Intent intent) {
> >         // TODO Auto-generated method stub
> >         Toast.makeText(context,"Receiver", Toast.LENGTH_LONG).show();
> > }
> > }
> >
> > //xml:manifest
> > <receiver android:name="LocationReceiver">
> >      <intent-filter>
> >             <action android:name="android.intent.action.LOCATION_CHANGED"
> />
> >             <category android:name="android.intent.category.DEFAULT"/>
> >   </intent-filter>
> >
> > --
> >
> >  A N K ! T......
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android 2.2 Programming Books: http://commonsware.com/books
>
> --
> 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]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to