Last active
December 11, 2015 05:48
-
-
Save meco300/4554406 to your computer and use it in GitHub Desktop.
NFCに反応するだけなら、[uses-permission][uses-feature][activity]を書き足すだけでOKです。
SDKのバージョンに10を選択しなかった場合は、uses-sdkも変更。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.test.nfc_test" | |
android:versionCode="1" | |
android:versionName="1.0" > | |
<!-- ① AndroidのSdkバージョン--> | |
<uses-sdk | |
android:minSdkVersion="10" | |
android:targetSdkVersion="10" /> | |
<!-- ① --> | |
<!-- ② NFC使いますよパーミッション --> | |
<uses-permission android:name="android.permission.NFC" /> | |
<!-- ② --> | |
<!-- ③ NFCある機種しかDLできませんよ設定 --> | |
<uses-feature | |
android:name="android.hardware.nfc" | |
android:required="true" /> | |
<!-- ③ --> | |
<application | |
android:allowBackup="true" | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" | |
android:theme="@style/AppTheme" > | |
<!-- ④Launchモードの設定。これをしないと何度も同じActivityが発生する --> | |
<activity | |
android:name="com.test.nfc_test.MainActivity" | |
android:label="@string/app_name" | |
android:launchMode="singleInstance"> | |
<intent-filter> | |
<action android:name="android.intent.action.MAIN" /> | |
<category android:name="android.intent.category.LAUNCHER" /> | |
</intent-filter> | |
</activity> | |
<!-- ④ --> | |
<activity | |
android:name="com.test.nfc_test.ResultActivity" | |
android:label="@string/app_name" | |
android:launchMode="singleInstance"> | |
</activity> | |
</application> | |
</manifest> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment