Oot : paging Jonathan S

by Jerry » Mon, 17 May 2010 12:35:51 GMT

Sponsored Links
 Joe .. Buka gtalk ...

Thx utk jalumnya



Oot : paging Jonathan S

by jonathan susanto » Mon, 17 May 2010 15:42:14 GMT

 Haha sorry bro, baru nyetir tadi bandung jakarta, jadi nya gw silent

Joe .. Buka gtalk ...

Thx utk jalumnya




Sponsored Links

Other Threads

1. android.bat -> NullPointerException for making AVD file !


I used to be able to properly make AVD files using android.bat file

Now, I don't really know what I've changed, but I always get this :

D:\android-sdk-windows-1.5_r1\tools>android.bat create avd -t 3 -n
Exception in thread "main" java.lang.NullPointerException
        at java.util.Collections$UnmodifiableMap.<init>(Unknown
        at java.util.Collections.unmodifiableMap(Unknown Source)
        at com.android.sdklib.avd.AvdManager$AvdInfo.<init>

Any ideas ?

Thanks a lot for your help !

PS : I've done some reboots + I reinstalled many times the SDK -> same


2. Best location data, regardless of provider?

Hi there,

Sorry if this has been answered already - I can't find the answer
either here or in Android Developers.

I want to get the user's location, using the best provider - either
GPS or network. If GPS is not updating, then I want to use the network
provider. If the user is outside and GPS is more accurate, then I want
to use GPS.

Does Android have some built-in method to grab the most accurate + up-
to-date location, from whichever provider?

I've got code working to register the LocationManager with every
available provider, but I don't know how to choose the most accurate
one - short of manually comparing the accuracy and age of the location
data given by each provider. (Which could get a bit complex, because
you don't want to discard data that's only a few seconds older, if
it's more accurate, but you do want to discard data that's more than a
few minutes old...)

Surely there's a simple way of doing this?



        public void onCreate(Bundle icicle) {

                // Register for location listener
                String location_context = Context.LOCATION_SERVICE;
                locationmanager = (LocationManager) getSystemService

                // Do some stuff

                // Now, get the best location from either network or GPS - how?
                Location locationGPS = 
                Location locationNetwork = locationmanager.getLastKnownLocation
                // Compare the two...?


        public void testProviders() {
                Log.e(LOG_TAG, "testProviders");
                StringBuilder sb = new StringBuilder("Enabled Providers");
                List<String> providers = locationmanager.getProviders(true);
                for (String provider : providers) {
                        listener = new LocationListener() {
                                public void onLocationChanged(Location 
location) {

                                public void onProviderDisabled(String provider) 

                                public void onProviderEnabled(String provider) {

                                public void onStatusChanged(String provider, 
int status,
                                                Bundle extras) {
                        locationmanager.requestLocationUpdates(provider, 1000, 

                        sb.append("\n*").append(provider).append(": ");

                        Location location = 

                       // It's clear from this that the various
providers are quite different in the age & accuracy of their data...
                        if (location != null) {
                                latitude = location.getLatitude();
                                longitude = location.getLongitude();
                                float locAccuracy = location.getAccuracy();
                                long locAge = location.getTime();
                                                ", accuracy = " + 
                                                ", time = " + locAge);
                        } else {
                                sb.append("No Location");

3. Why such a long gap between G1 and the next Android phones?

4. Screen flip-out on G1

5. Get File Path With URI

6. Pending intent not detecting onCreate

7. Spry onload command