通过nfc实时读取数据并拨打电话
This commit is contained in:
@@ -20,39 +20,36 @@
|
||||
android:theme="@style/AppTheme">
|
||||
<activity
|
||||
android:name=".activity.main.MainActivity"
|
||||
android:exported="true">
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
<intent-filter>
|
||||
<action android:name="android.nfc.action.TECH_DISCOVERED" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<data android:mimeType="text/plain" /> <!-- 指定数据类型 -->
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.nfc.action.TECH_DISCOVERED"
|
||||
android:resource="@xml/nfc_tech_filter" />
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name=".activity.nfc.NfcActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTop">
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.nfc.action.NDEF_DISCOVERED" />-->
|
||||
<!-- <category android:name="android.intent.category.DEFAULT" />-->
|
||||
<!-- <data android:mimeType="text/plain" />-->
|
||||
<!-- </intent-filter>-->
|
||||
<!-- <intent-filter>-->
|
||||
<!-- <action android:name="android.nfc.action.TECH_DISCOVERED" />-->
|
||||
<!-- </intent-filter>-->
|
||||
android:launchMode="singleTask"
|
||||
android:permission="android.permission.NFC">
|
||||
|
||||
<!-- Offer to display anything with NDEF data -->
|
||||
<intent-filter>
|
||||
<action android:name="android.nfc.action.TECH_DISCOVERED" />
|
||||
</intent-filter>
|
||||
|
||||
<meta-data
|
||||
android:name="android.nfc.action.TECH_DISCOVERED"
|
||||
android:resource="@xml/filter_nfc" />
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<data android:mimeType="vnd.android.cursor.item/ndef_msg" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- <meta-data-->
|
||||
<!-- android:name="android.nfc.action.TECH_DISCOVERED"-->
|
||||
<!-- android:resource="@xml/nfc_tech_filter" />-->
|
||||
</activity>
|
||||
|
||||
<service
|
||||
@@ -71,6 +68,16 @@
|
||||
android:resource="@xml/accessibility_service_config" />
|
||||
</service>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.tag.provider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/provider_paths" />
|
||||
</provider>
|
||||
|
||||
<meta-data
|
||||
android:name="design_width_in_dp"
|
||||
android:value="360" />
|
||||
|
||||
Reference in New Issue
Block a user