Oot : paging Jonathan S

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


Sponsored Links
 Joe .. Buka gtalk ...

Thx utk jalumnya


Jerry

-- 
"



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


Jerry

--
"

-- 
"


Sponsored Links


Other Threads

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

Hello,

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
myAVD
Exception in thread "main" java.lang.NullPointerException
        at java.util.Collections$UnmodifiableMap.<init>(Unknown
Source)
        at java.util.Collections.unmodifiableMap(Unknown Source)
        at com.android.sdklib.avd.AvdManager$AvdInfo.<init>
(AvdManager.java:196)

Any ideas ?

Thanks a lot for your help !

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

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

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?

thanks!
Anna

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

        public void onCreate(Bundle icicle) {
                super.onCreate(icicle);
                setContentView(R.layout.home);

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

                // Do some stuff

                // Now, get the best location from either network or GPS - how?
                Location locationGPS = 
locationmanager.getLastKnownLocation("gps");
                Location locationNetwork = locationmanager.getLastKnownLocation
("network");
                // 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, 
0,
listener);

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

                        Location location = 
locationmanager.getLastKnownLocation(provider);

                       // 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();
                                sb.append(latitude).append(", 
").append(longitude).append(
                                                ", accuracy = " + 
locAccuracy).append(
                                                ", time = " + locAge);
                        } else {
                                sb.append("No Location");
                        }
                }
                tv.setText(sb);
        }
--~--~---------~--~----~------------~-------~--~----~

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