I’m working on an Android app in which I would like to use multi-touch. However, I do not want to completely leave out those still running a 1.x OS phone. How do you program the app so that you can use the 2.x multi-touch APIs (or any other higher level API for that matter) and still allow it to gracefully degrade on 1.x systems. If you create a project in Eclipse for 1.x can you even still access the 2.x APIs?
Basically I want it to show up in the marketplace and work on all 1.6 and higher phones and just allow access to the higher level functionality if available.
Also, if anyone can point me to any data on the number of 1.x devices vs. 2.x devices in use, it would be greatly appreciated.
Here is how I use the AccountManager on 2.* but have a fallback on 1.* where it isn’t available.
I build with the 2.1 SDK, but my Manifest states
This does allow the app to run on 1.5 devices upwards.
I restrict my use of android.accounts.AccountManager to a wrapper class, I called it UserEmailFetcher.
It will be possible to use this class on 2.* devices. However on earlier devices a java.lang.VerifyError will fire the first time this class is encountered in the code. This I catch, and perform some fallback action.
Hope that helps.