How to get the highest API level supported by the device?

by Dianne Hackborn » Sat, 28 Nov 2009 08:12:57 GMT

Sponsored Links
 It's only deprecated because it's better to use SDK_INT if your
minSdkVersion is >= 4.

> > >

How to get the highest API level supported by the device?

by Dianne Hackborn » Sun, 29 Nov 2009 02:46:49 GMT

 No it will not.

> > > > >

Sponsored Links

Other Threads

1. getScale() method of BaseAdapter class Question!


I implement a class inheriting the BaseAdapter to provide data for a
Gallery. There is a method in the BaseAdapter class that I have to
implement is getScale(boolean focused, int offset)

This method is used to scale images which are on left and right hand
side of the center image. I tried to write logs to know the order in
which getView, getScale, onDraw(of gallery), onDraw(of ImageView)
methods are called. I wonder how the getScale method would be called.
What I mean is when this method will be called and by which method,
which event of gallery object.

I want to know this because I want to do something else when images
are scaled (when getScale() method is called). Which method should I
override to control this?



2. Error recieving broadcast null in LocationIntentReciever

Would someone post code that successfully removes updates and
unregisters receivers without ever getting the broadcast null crash?

I have tried every imaginable combination of changes, including a
boolean on variable, but with a few runs of the app, it still
eventually gives this crash after I close, even when wiping data on
the emulator.

Here's my current relevant code:

    private LocationManager locationManager;
    private LocationIntentReceiver intentReceiver = new
    private static final String LOCATION_CHANGED_ACTION = new
    private IntentFilter intentFilter = new
    private Intent intent = new Intent(LOCATION_CHANGED_ACTION);

    public void onCreate(Bundle icicle) {

        locationManager =
        registerReceiver(intentReceiver, intentFilter);

    public class LocationIntentReceiver extends IntentReceiver{
        public void onReceiveIntent(Context context, Intent intent) {
                if (startLocation == null)

                        //Location currentLocation = 
                        Location currentLocation =


    public void onResume() {
                List<LocationProvider> providers = 
                LocationProvider locationProvider = providers.get(0);
                locationManager.requestUpdates(locationProvider, 0, 0, intent);

    public void onFreeze(Bundle icicle) {

    public void onDestroy() {


3. SearchManager / Searchability API feedback (M5)

4. dx result is not always the same?

5. Proxy.getInvocationHandler(...) returns null

6. HELP! Weird Activity lifecycle / thread issue

7. Dialog generating NullPointerException