Open niccolospa opened 6 years ago
@niccolospa
Can you get these details?
Android Version Device Name
I tested it onto two devices:
It looks like your Tag is not formatted to Ndef. You can try this methods from the following package.
https://developer.android.com/reference/android/nfc/tech/NdefFormatable
I will try to get a unformatted Tag to try this.
After several trials this is what I got:
get
method of NdefFormatable
returned null because as the API says: "This indicates the tag is not NDEF formatable by this Android device."After I formatted the tag to NDEF, why the app on Sony Xperia doesn't show me the message even if NFC tools can read it without problems?
Can you help me sorting this out? I'm posting the logcat:
When I try to read a TAG: 05-14 10:28:40.385 13786-13786/? V/Zygote: Switching descriptor 40 to /dev/null Switching descriptor 10 to /dev/null 05-14 10:28:40.385 13786-13786/? D/dalvikvm: Late-enabling CheckJNI 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve interface method 15848: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x72 at 0x000c 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;) 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve interface method 15850: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x72 at 0x0007 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve interface method 15854: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x72 at 0x0009 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 462: Landroid/content/res/TypedArray;.getChangingConfigurations ()I 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0004 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 484: Landroid/content/res/TypedArray;.getType (I)I 05-14 10:28:40.505 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0020 05-14 10:28:40.555 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild 05-14 10:28:40.555 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 16282: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 05-14 10:28:40.555 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0016 05-14 10:28:40.555 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList 05-14 10:28:40.555 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 275: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList; 05-14 10:28:40.555 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0029 05-14 10:28:40.565 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable 05-14 10:28:40.565 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 425: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable; 05-14 10:28:40.565 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0009 05-14 10:28:40.565 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity 05-14 10:28:40.565 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 427: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable; 05-14 10:28:40.565 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x000b 05-14 10:28:40.575 13786-13786/com.learn2crack.nfc E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering 05-14 10:28:40.575 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve instanceof 142 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper; 05-14 10:28:40.575 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x20 at 0x0011 05-14 10:28:40.775 13786-13786/com.learn2crack.nfc I/Adreno-EGL:: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.04.048.065_msm8226_LNX.LA.3.5.1_RB1__release_AU ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 06/30/14 Mon
Local Branch:
Remote Branch: quic/LNX.LA.3.5.1_RB1.2
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.04.048.065 + NOTHING
05-14 10:28:40.925 13786-13786/com.learn2crack.nfc D/OpenGLRenderer: Enabling debug mode 0
05-14 10:28:41.015 13786-13786/com.learn2crack.nfc I/Activity_Manager: Timeline: Activity_idle id: android.os.BinderProxy@41edb768 time:2159919
05-14 10:28:41.255 13786-13786/com.learn2crack.nfc I/Activity_Manager: Timeline: Activity_idle id: android.os.BinderProxy@41edb768 time:2160151
05-14 10:28:50.745 13786-13786/com.learn2crack.nfc I/dalvikvm: Could not find method android.app.DialogFragment.onAttach, referenced from method com.learn2crack.nfc.NFCReadFragment.onAttach
05-14 10:28:50.745 13786-13786/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 109: Landroid/app/DialogFragment;.onAttach (Landroid/content/Context;)V
05-14 10:28:50.745 13786-13786/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
05-14 10:28:51.895 13786-13786/com.learn2crack.nfc D/MainActivity: onNewIntent: android.nfc.action.TAG_DISCOVERED
05-14 10:28:54.385 13786-13786/com.learn2crack.nfc W/InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
05-14 10:28:54.405 13786-13786/com.learn2crack.nfc D/AndroidRuntime: Shutting down VM
05-14 10:28:54.405 13786-13786/com.learn2crack.nfc W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x416add88)
05-14 10:28:54.405 13786-13786/com.learn2crack.nfc E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.learn2crack.nfc, PID: 13786
java.lang.NullPointerException
at com.learn2crack.nfc.NFCReadFragment.onDetach(NFCReadFragment.java:54)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1017)
at android.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1167)
at android.app.BackStackRecord.run(BackStackRecord.java:654)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5124)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:613)
at dalvik.system.NativeStart.main(Native Method)
05-14 10:28:56.675 13786-13786/com.learn2crack.nfc I/Process: Sending signal. PID: 13786 SIG: 9
When I try to write a TAG: 05-14 10:30:02.635 14159-14159/? V/Zygote: Switching descriptor 40 to /dev/null Switching descriptor 10 to /dev/null 05-14 10:30:02.635 14159-14159/? D/dalvikvm: Late-enabling CheckJNI 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.view.Window$Callback.onProvideKeyboardShortcuts, referenced from method android.support.v7.view.WindowCallbackWrapper.onProvideKeyboardShortcuts 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve interface method 15848: Landroid/view/Window$Callback;.onProvideKeyboardShortcuts (Ljava/util/List;Landroid/view/Menu;I)V 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x72 at 0x000c 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to find class referenced in signature (Landroid/view/SearchEvent;) 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.view.Window$Callback.onSearchRequested, referenced from method android.support.v7.view.WindowCallbackWrapper.onSearchRequested 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve interface method 15850: Landroid/view/Window$Callback;.onSearchRequested (Landroid/view/SearchEvent;)Z 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x72 at 0x0007 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.view.Window$Callback.onWindowStartingActionMode, referenced from method android.support.v7.view.WindowCallbackWrapper.onWindowStartingActionMode 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve interface method 15854: Landroid/view/Window$Callback;.onWindowStartingActionMode (Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x72 at 0x0009 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.widget.TintTypedArray.getChangingConfigurations 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 462: Landroid/content/res/TypedArray;.getChangingConfigurations ()I 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0004 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.widget.TintTypedArray.getType 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 484: Landroid/content/res/TypedArray;.getType (I)I 05-14 10:30:02.715 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0020 05-14 10:30:02.745 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.widget.FrameLayout.startActionModeForChild, referenced from method android.support.v7.widget.ActionBarContainer.startActionModeForChild 05-14 10:30:02.755 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 16282: Landroid/widget/FrameLayout;.startActionModeForChild (Landroid/view/View;Landroid/view/ActionMode$Callback;I)Landroid/view/ActionMode; 05-14 10:30:02.755 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0016 05-14 10:30:02.755 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.Context.getColorStateList, referenced from method android.support.v7.content.res.AppCompatResources.getColorStateList 05-14 10:30:02.755 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 275: Landroid/content/Context;.getColorStateList (I)Landroid/content/res/ColorStateList; 05-14 10:30:02.755 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0029 05-14 10:30:02.765 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.Resources.getDrawable, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawable 05-14 10:30:02.765 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 425: Landroid/content/res/Resources;.getDrawable (ILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable; 05-14 10:30:02.765 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x0009 05-14 10:30:02.765 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.content.res.Resources.getDrawableForDensity, referenced from method android.support.v7.widget.ResourcesWrapper.getDrawableForDensity 05-14 10:30:02.765 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 427: Landroid/content/res/Resources;.getDrawableForDensity (IILandroid/content/res/Resources$Theme;)Landroid/graphics/drawable/Drawable; 05-14 10:30:02.765 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6e at 0x000b 05-14 10:30:02.775 14159-14159/com.learn2crack.nfc E/dalvikvm: Could not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering 05-14 10:30:02.775 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve instanceof 142 (Landroid/graphics/drawable/RippleDrawable;) in Landroid/support/v7/widget/AppCompatImageHelper; 05-14 10:30:02.775 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x20 at 0x0011 05-14 10:30:02.865 14159-14159/com.learn2crack.nfc I/Adreno-EGL:: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.04.048.065_msm8226_LNX.LA.3.5.1_RB1__release_AU ()
OpenGL ES Shader Compiler Version: E031.24.00.15
Build Date: 06/30/14 Mon
Local Branch:
Remote Branch: quic/LNX.LA.3.5.1_RB1.2
Local Patches: NONE
Reconstruct Branch: AU_LINUX_ANDROID_LNX.LA.3.5.1_RB1.04.04.04.048.065 + NOTHING
05-14 10:30:02.885 14159-14159/com.learn2crack.nfc D/OpenGLRenderer: Enabling debug mode 0
05-14 10:30:02.975 14159-14159/com.learn2crack.nfc I/Activity_Manager: Timeline: Activity_idle id: android.os.BinderProxy@41edde18 time:2241870
05-14 10:30:17.515 14159-14159/com.learn2crack.nfc I/dalvikvm: Could not find method android.app.DialogFragment.onAttach, referenced from method com.learn2crack.nfc.NFCWriteFragment.onAttach
05-14 10:30:17.515 14159-14159/com.learn2crack.nfc W/dalvikvm: VFY: unable to resolve virtual method 109: Landroid/app/DialogFragment;.onAttach (Landroid/content/Context;)V
05-14 10:30:17.525 14159-14159/com.learn2crack.nfc D/dalvikvm: VFY: replacing opcode 0x6f at 0x0002
05-14 10:30:18.715 14159-14159/com.learn2crack.nfc D/MainActivity: onNewIntent: android.nfc.action.TAG_DISCOVERED
05-14 10:30:21.775 14159-14159/com.learn2crack.nfc W/InputEventReceiver: Attempted to finish an input event but the input event receiver has already been disposed.
05-14 10:30:21.795 14159-14159/com.learn2crack.nfc D/AndroidRuntime: Shutting down VM
05-14 10:30:21.795 14159-14159/com.learn2crack.nfc W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x416add88)
05-14 10:30:21.805 14159-14159/com.learn2crack.nfc E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.learn2crack.nfc, PID: 14159
java.lang.NullPointerException
at com.learn2crack.nfc.NFCWriteFragment.onDetach(NFCWriteFragment.java:57)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1017)
at android.app.FragmentManagerImpl.removeFragment(FragmentManager.java:1167)
at android.app.BackStackRecord.run(BackStackRecord.java:654)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1447)
at android.app.FragmentManagerImpl$1.run(FragmentManager.java:443)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5124)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:613)
at dalvik.system.NativeStart.main(Native Method)