- Near Field Communication with Android Cookbook
- Vitor Subtil
- 207字
- 2021-07-16 11:37:22
Defining minimal requirements
Defining minimal requirements is a very important step since only users with minimal requirements will be able to run our application properly.
NFC was introduced in Android Version 2.3, API level 9, although some very important features, such as being able to get an instance of the NFC Adapter, were only introduced in API level 10. This is the minimum API level we can work with. Users with previous versions of Android will not be able to use our NFC applications unless a fallback alternative is added.
How to do it…
We are going to define the minimum required version of Android to enable our application to use NFC features, as follows:
- Open the previously created
NfcBookCh1Example1
project. - Set the minimum SDK version to
10
with the following code:<uses-sdk android:minSdkVersion="10" />
How it works…
When we add the previous line to the manifest file, Eclipse will automatically scan our code and warn us of incompatible pieces of code. This is also used in the market to filter searches for apps that our devices are able to run. NFC-related features are consistently being added and improved in the latest Android releases; so, depending on your application specifications, you may need to target a higher version.
- 我們都是數據控:用大數據改變商業、生活和思維方式
- Building Computer Vision Projects with OpenCV 4 and C++
- 達夢數據庫編程指南
- Modern Programming: Object Oriented Programming and Best Practices
- Ceph源碼分析
- 深入淺出 Hyperscan:高性能正則表達式算法原理與設計
- 數據庫應用系統開發實例
- Expert Python Programming(Third Edition)
- MySQL數據庫實用教程
- 云工作時代:科技進化必將帶來的新工作方式
- 大數據隱私保護技術與治理機制研究
- 碼上行動:利用Python與ChatGPT高效搞定Excel數據分析
- 數據中心UPS系統運維
- Hadoop大數據技術開發實戰
- Visual Studio 2010(C#)Web數據庫項目開發