I did what you suggested , what is happening now is If I run the app in 1.6 emulator my app is getting crashed since I am using following method to check whether Telephony is available or not. hasSystemFeature() method is not there is 1.6. that is the reaon why it is crashing how to handle this scenario.
public static Boolean hasTelephony(Context context){ PackageManager pm = ((Activity)context).getPackageManager(); return pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY); } This is the error I am getting " Could not find method android.content.pm.PackageManager.hasSystemFeature, referenced from method com.example.utils.Util.hasTelephony". Any idea? Is any other way to achieve what I want ? On Wed, Nov 9, 2011 at 8:45 PM, String <sterling.ud...@googlemail.com>wrote: > There are two pieces to this puzzle, I think. > > First, in the top level of your manifest, you should have an element like > this: > > <uses-sdk android:minSdkVersion="4" > android:targetSdkVersion="14" > /> > > Second, under Properties > Android for your project in Eclipse, make sure > that the build target is 14 (4.0). > > This combination is working fine for me with a number of projects having > optional uses-features. > > String > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to android-developers@googlegroups.com > To unsubscribe from this group, send email to > android-developers+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en