Search code examples
androidcordovabarcode-scannerphonegap-plugins

sdk target for barcode scanner library and main cordova android app project


I am working on a Cordova Android project with barcode scanning ability. I find the detailed steps on this blog helpful: http://simonmacdonald.blogspot.ca/2011/12/installing-barcode-plugin-for-phonegap.html

However, I am a bit concerned about the mismatch of SDK target of barcodeScanner library (Android 4.0) and that of main project being 2.x. As 2.x is still dominant Android OS in the market, it makes sense to build main project targeting 2.x.

Will that barcodeScanner library targeting 4.0 work well on 2.x handset?

Am I missing something here?

Any pitfalls to watch out for? especially considering future code changes to adapt to fast changing Android handsets.


Solution

  • Don't worry about it. You always want to build your app against the latest version of the Android SDK. The SDK can handle the backwards compatibility aspects. If you want to target from Android 2.1 and higher set the minimum SDK to 7 in your AndroidManifest.xml.