这是indexloc提供的服务,不要输入任何密码
Skip to content

Commit fab6872

Browse files
Fixed: Fix exception for missing android.nfc.action.TECH_DISCOVERED meta-data for NfcAPI$NfcActivity
https://developer.android.com/guide/topics/connectivity/nfc/nfc#tech-disc ``` W/RegisteredComponentCache: Unable to load component info ResolveInfo{eed0b9c com.termux.api/.apis.NfcAPI$NfcActivity m=0x108000} org.xmlpull.v1.XmlPullParserException: No android.nfc.action.TECH_DISCOVERED meta-data at com.android.nfc.RegisteredComponentCache.parseComponentInfo(RegisteredComponentCache.java:186) at com.android.nfc.RegisteredComponentCache.generateComponentsList(RegisteredComponentCache.java:161) at com.android.nfc.RegisteredComponentCache$1.onReceive(RegisteredComponentCache.java:66) at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1162) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6247) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:872) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:762) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:107) ```
1 parent 24fbea7 commit fab6872

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@
108108
<action android:name="android.nfc.action.TECH_DISCOVERED"/>
109109
<category android:name="android.intent.category.DEFAULT"/>
110110
</intent-filter>
111+
112+
<meta-data android:name="android.nfc.action.TECH_DISCOVERED"
113+
android:resource="@xml/nfc_tech_filter" />
114+
111115
</activity>
112116

113117
<activity android:name=".apis.SAFAPI$SAFActivity"
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
2+
<tech-list>
3+
<tech>android.nfc.tech.Ndef</tech>
4+
</tech-list>
5+
</resources>

0 commit comments

Comments
 (0)