Here, a working example (using an intentlistener that receives
location updates:

        private void setupLocationManager() {
                lm = (LocationManager) 
getSystemService(Context.LOCATION_SERVICE);
                Criteria crit = new Criteria();
                crit.setCostAllowed(false);
                crit.setPowerRequirement(Criteria.POWER_LOW);
                lp = lm.getBestProvider(crit);

                // make sure we update our location
                Intent i = new Intent(LOCATION_CHANGED_INTENT);
                lm.requestUpdates(lp, 60*1000, 1000, i);
                IntentFilter filter = new IntentFilter(LOCATION_CHANGED_INTENT);
                registerReceiver(new IntentReceiver(){
                        @Override
                        public void onReceiveIntent(Context context, Intent 
intent) {
                                Location location = (Location)
intent.getParcelableExtra("location");
                                Double lat = location.getLatitude()*1E6;
                                Double lng = location.getLongitude()*1E6;
                                myLoc = new Point(lat.intValue(), 
lng.intValue());
                                listView.invalidateViews();
                                Log.d(TAG, "Refreshing list view: my location 
changed");
                        }
                }, filter);
        }

On Apr 8, 2:05 pm, "Vijayabaskar s" <[EMAIL PROTECTED]>
wrote:
> Hi Hielko,
>
> U try this .....
> Correctly get message...
>
> U know SMSReceiver class ..
> i get message from SMSReceiver...
> How to call SMSActivity and then update that message to textview...
>
> Regards,
> Baskar
--~--~---------~--~----~------------~-------~--~----~
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]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to