Does Android support the arm9-linux?

by Thinking » Sat, 13 Sep 2008 07:55:55 GMT


Sponsored Links
 Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Setting margins for an imageview using code

Hello guys..This is urgent..can u plz help..



--~--~---------~--~----~------------~-------~--~----~

2. LocationListener and location api working in Android Dev Phone (G1)

Hi sheik,

Please see below code. And you can see reference.
http://developer.android.com/reference/android/location/LocationListener.html

1. Implement LocationListener interface.
2. Get Location Manager.
3. Register LocationListener to LocationManager.

LocationListener.onLocationChanged(Location location) method is called 
when GPS can receive location.

You can set minimum interval time or distance to work GPS on 
requestLocationUpdates method.

Attention, if LocationListener is once registered, GPS will be being 
activated basically.
You should call to LocationManager.removeUpdates at onDestroy or onStop.

Good luck,
Keiji

-----------------------------------------------------------------------
public class GPSActivity extends Activity {

// LocationManager
private LocationManager _mLocMan;

// LocationListener Interface
private final LocationListener _mLocationListener = new LocationListener() {
        @Override
        public void onLocationChanged(Location location) {
                // implement here
        }
        @Override
        public void onProviderDisabled(String provider) {
        }
        @Override
        public void onProviderEnabled(String provider) {
        }
        @Override
        public void onStatusChanged(String provider, int status, Bundle extras)
        {
        }
}; // _mLocationListener

@Override
public void onCreate(Bundle savedInstanceState) {

        // get Location Manager
        _mLocMan
        = (LocationManager)this.getSystemService(LOCATION_SERVICE);

        // register location listener
        _mLocMan.requestLocationUpdates(
                LocationManager.GPS_PROVIDER,
                0,
                0,
                _mLocationListener);

} // onCreate

@Override
public void onDestroy() {
        // unregister location listener
        _mLocMan.removeUpdates(_mLocationListener);

} // onDestroy

} // GPSActivity

-----------------------------------------------------------------------




-- 
Keiji,
ml_andr...@c-lis.co.jp

--~--~---------~--~----~------------~-------~--~----~

3. Interview an Android developer

4. why? the new master beacome very slowly?

5. How does the SensorManager get sensors list?

6. GPS LocationManager Problem

7. LocationListener and location api working in Android Dev Phone (G1)