- 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.
- Unity 5.x Game AI Programming Cookbook
- 數(shù)據(jù)結(jié)構(gòu)與算法(C語(yǔ)言版)
- 大數(shù)據(jù)架構(gòu)和算法實(shí)現(xiàn)之路:電商系統(tǒng)的技術(shù)實(shí)戰(zhàn)
- Python金融實(shí)戰(zhàn)
- Spark大數(shù)據(jù)分析實(shí)戰(zhàn)
- Power BI商業(yè)數(shù)據(jù)分析完全自學(xué)教程
- LabVIEW 完全自學(xué)手冊(cè)
- 深入淺出 Hyperscan:高性能正則表達(dá)式算法原理與設(shè)計(jì)
- 探索新型智庫(kù)發(fā)展之路:藍(lán)迪國(guó)際智庫(kù)報(bào)告·2015(下冊(cè))
- Spark分布式處理實(shí)戰(zhàn)
- Unreal Engine Virtual Reality Quick Start Guide
- 菜鳥(niǎo)學(xué)SPSS數(shù)據(jù)分析
- Doris實(shí)時(shí)數(shù)倉(cāng)實(shí)戰(zhàn)
- 區(qū)塊鏈+:落地場(chǎng)景與應(yīng)用實(shí)戰(zhàn)
- 數(shù)據(jù)庫(kù)應(yīng)用系統(tǒng)技術(shù)