Forum Replies Created
-
Re: Reply To: Creating NFC Android App to act as MIFARE card to interact with MIFARE readers
25. August 2015 at 22:04 in reply to: Creating NFC Android App to act as MIFARE card to interact with MIFARE readersI am trying to emulate the DESfire MiFare protocol. So is that possible? When talking to MiFare/NXP, I was told it was not possible. Has something changed?
+ 0 | - 0
So in order to import the Lite sample app into Android Studio I did the following:
1. Extracted the downloaded zip file containing the project
2. copied the "nxpnfcliblite.jar" into the libs dir: "MIFARE_SDK_lite3SampleApps\src\SampleNxpNfcLibLite\libs" as suggested above
3. Within Android Studio, I did: File > New > Import Project
4. Selected the project dir "SampleNxpNfcLibLite" and selected to have it imported into Android Studio workspace
5. On screen for "Import Project from ADT (Eclipse Android)", i have selected the following checked:
- Replace jars with dependencies, when possible
- Replace library sources with dependencies, when possible
- Create Gradle-style (camelCase) module names
6. Select Next and get the following warnings "Project SampleNxpNfcLibLite:C:\Users\alivick\Desktop\SampleNxpNfcLibLite\project.properties:
Library reference ..\NxpNfcLib could not be found
Path is C:\Users\alivick\Desktop\SampleNxpNfcLibLite\..\NxpNfcLib which resolves to C:\Users\alivick\Desktop\NxpNfcLib"
7. Select Finish and I get the following error "There are unrecoverable errors which must be corrected first"
8. Select OK and it just takes me back to the warning screen and doesn't import the project.
So is there some other means in which I am supposed to import the sample project into Android Studio?
+ 0 | - 0
I was just trying to use the sample app code that they provided and since the instructions used Eclipse that is what I did. I would be happy to do this within Android Studio. Would you be able to tell me how to properly import the sample project into Android Studio? I got errors trying to do that. Otherwise yes I was going to try and create the app from scratch in Eclipse. Thanks.
+ 0 | - 0
So I am not sure what library it is referring to since I added the correct jar that was referenced in the user manual and didn't mention a library in that section. Is there anything else that needs to be added?
On a different note can one use the MIFARE SDK to develop an android app that would act like the IC cards themselves to interact with separate hardware readers by NXP?
Thanks for the help.
+ 0 | - 0
It definitely says "NxpNfcLib". I double checked I added the nxpnfcliblite.jar under Project Properties > Java Build Path > Libraries as well. Would you be able to tell me what this sample app is supposed to do anyways, if it was working?
+ 0 | - 0
What is the SDK Lite sample app supposed to do anyways? I am trying to get the Eclipse project working and installed on a phone (Samsung Galaxy Nexus and Samsung Galaxy S4) but when it runs it gets an error, "Unfortunately, Sample App MIFARE SDK Lite has stopped" The LogCat is below. I think the issue is that if I go to the Project Properties and under Android > Library section it can't find "..\NxpNfcLib". I don't know where to find that. I added the "nxpnfcliblite.jar" file to the project like the User Manual stated to do, so I am not sure what I am missing. Thanks.
06-09 20:30:08.179: D/dalvikvm(14982): Late-enabling CheckJNI
06-09 20:30:08.452: D/dalvikvm(14982): GC_FOR_ALLOC freed 64K, 2% free 8665K/8756K, paused 23ms, total 24ms
06-09 20:30:08.460: I/dalvikvm-heap(14982): Grow heap (frag case) to 13.756MB for 5526584-byte allocation
06-09 20:30:08.577: D/dalvikvm(14982): GC_FOR_ALLOC freed <1K, 1% free 14061K/14156K, paused 113ms, total 113ms
06-09 20:30:08.608: D/dalvikvm(14982): GC_CONCURRENT freed 1K, 1% free 14065K/14156K, paused 3ms+13ms, total 32ms
06-09 20:30:08.663: D/libEGL(14982): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
06-09 20:30:08.679: D/libEGL(14982): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
06-09 20:30:08.687: D/libEGL(14982): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
06-09 20:30:08.772: D/OpenGLRenderer(14982): Enabling debug mode 0
06-09 20:30:10.882: I/dalvikvm(14982): Could not find method com.nxp.nfclib.plus.PlusSL1.getCardDetails, referenced from method com.nxp.sampleliblite.MainLiteActivity.PlusSL1CardLogic
06-09 20:30:10.882: W/dalvikvm(14982): VFY: unable to resolve virtual method 4705: Lcom/nxp/nfclib/plus/PlusSL1;.getCardDetails ()Lcom/nxp/nfclib/classic/MFClassic$CardDetails;
06-09 20:30:10.882: D/dalvikvm(14982): VFY: replacing opcode 0x6e at 0x0016
06-09 20:30:10.882: W/dalvikvm(14982): VFY: unable to resolve exception class 646 (Lcom/nxp/nfclib/exceptions/SmartCardException;)
06-09 20:30:10.882: W/dalvikvm(14982): VFY: unable to find exception handler at addr 0x72
06-09 20:30:10.882: W/dalvikvm(14982): VFY: rejected Lcom/nxp/sampleliblite/MainLiteActivity;.PlusSL1CardLogic ()V
06-09 20:30:10.882: W/dalvikvm(14982): VFY: rejecting opcode 0x0d at 0x0072
06-09 20:30:10.882: W/dalvikvm(14982): VFY: rejected Lcom/nxp/sampleliblite/MainLiteActivity;.PlusSL1CardLogic ()V
06-09 20:30:10.882: W/dalvikvm(14982): Verifier rejected class Lcom/nxp/sampleliblite/MainLiteActivity;
06-09 20:30:10.882: W/dalvikvm(14982): Class init failed in newInstance call (Lcom/nxp/sampleliblite/MainLiteActivity;)
06-09 20:30:10.882: D/AndroidRuntime(14982): Shutting down VM
06-09 20:30:10.882: W/dalvikvm(14982): threadid=1: thread exiting with uncaught exception (group=0x41597930)
06-09 20:30:10.890: E/AndroidRuntime(14982): FATAL EXCEPTION: main
06-09 20:30:10.890: E/AndroidRuntime(14982): java.lang.VerifyError: com/nxp/sampleliblite/MainLiteActivity
06-09 20:30:10.890: E/AndroidRuntime(14982): at java.lang.Class.newInstanceImpl(Native Method)
06-09 20:30:10.890: E/AndroidRuntime(14982): at java.lang.Class.newInstance(Class.java:1319)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.app.ActivityThread.access$600(ActivityThread.java:141)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.os.Handler.dispatchMessage(Handler.java:99)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.os.Looper.loop(Looper.java:137)
06-09 20:30:10.890: E/AndroidRuntime(14982): at android.app.ActivityThread.main(ActivityThread.java:5041)
06-09 20:30:10.890: E/AndroidRuntime(14982): at java.lang.reflect.Method.invokeNative(Native Method)
06-09 20:30:10.890: E/AndroidRuntime(14982): at java.lang.reflect.Method.invoke(Method.java:511)
06-09 20:30:10.890: E/AndroidRuntime(14982): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-09 20:30:10.890: E/AndroidRuntime(14982): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-09 20:30:10.890: E/AndroidRuntime(14982): at dalvik.system.NativeStart.main(Native Method)
06-09 20:46:17.187: D/dalvikvm(15225): GC_FOR_ALLOC freed 46K, 1% free 8665K/8740K, paused 15ms, total 16ms
06-09 20:46:17.210: I/dalvikvm-heap(15225): Grow heap (frag case) to 13.756MB for 5526584-byte allocation
06-09 20:46:17.226: D/dalvikvm(15225): GC_FOR_ALLOC freed <1K, 1% free 14061K/14140K, paused 18ms, total 18ms
06-09 20:46:17.241: D/dalvikvm(15225): GC_CONCURRENT freed <1K, 1% free 14061K/14140K, paused 3ms+3ms, total 18ms
06-09 20:46:17.296: D/libEGL(15225): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
06-09 20:46:17.319: D/libEGL(15225): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
06-09 20:46:17.319: D/libEGL(15225): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
06-09 20:46:17.397: D/OpenGLRenderer(15225): Enabling debug mode 0
06-09 20:46:19.405: I/dalvikvm(15225): Could not find method com.nxp.nfclib.plus.PlusSL1.getCardDetails, referenced from method com.nxp.sampleliblite.MainLiteActivity.PlusSL1CardLogic
06-09 20:46:19.405: W/dalvikvm(15225): VFY: unable to resolve virtual method 4705: Lcom/nxp/nfclib/plus/PlusSL1;.getCardDetails ()Lcom/nxp/nfclib/classic/MFClassic$CardDetails;
06-09 20:46:19.405: D/dalvikvm(15225): VFY: replacing opcode 0x6e at 0x0016
06-09 20:46:19.405: W/dalvikvm(15225): VFY: unable to resolve exception class 646 (Lcom/nxp/nfclib/exceptions/SmartCardException;)
06-09 20:46:19.405: W/dalvikvm(15225): VFY: unable to find exception handler at addr 0x72
06-09 20:46:19.405: W/dalvikvm(15225): VFY: rejected Lcom/nxp/sampleliblite/MainLiteActivity;.PlusSL1CardLogic ()V
06-09 20:46:19.405: W/dalvikvm(15225): VFY: rejecting opcode 0x0d at 0x0072
06-09 20:46:19.405: W/dalvikvm(15225): VFY: rejected Lcom/nxp/sampleliblite/MainLiteActivity;.PlusSL1CardLogic ()V
06-09 20:46:19.405: W/dalvikvm(15225): Verifier rejected class Lcom/nxp/sampleliblite/MainLiteActivity;
06-09 20:46:19.405: W/dalvikvm(15225): Class init failed in newInstance call (Lcom/nxp/sampleliblite/MainLiteActivity;)
06-09 20:46:19.405: D/AndroidRuntime(15225): Shutting down VM
06-09 20:46:19.405: W/dalvikvm(15225): threadid=1: thread exiting with uncaught exception (group=0x41597930)
06-09 20:46:19.413: E/AndroidRuntime(15225): FATAL EXCEPTION: main
06-09 20:46:19.413: E/AndroidRuntime(15225): java.lang.VerifyError: com/nxp/sampleliblite/MainLiteActivity
06-09 20:46:19.413: E/AndroidRuntime(15225): at java.lang.Class.newInstanceImpl(Native Method)
06-09 20:46:19.413: E/AndroidRuntime(15225): at java.lang.Class.newInstance(Class.java:1319)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.app.ActivityThread.access$600(ActivityThread.java:141)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.os.Handler.dispatchMessage(Handler.java:99)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.os.Looper.loop(Looper.java:137)
06-09 20:46:19.413: E/AndroidRuntime(15225): at android.app.ActivityThread.main(ActivityThread.java:5041)
06-09 20:46:19.413: E/AndroidRuntime(15225): at java.lang.reflect.Method.invokeNative(Native Method)
06-09 20:46:19.413: E/AndroidRuntime(15225): at java.lang.reflect.Method.invoke(Method.java:511)
06-09 20:46:19.413: E/AndroidRuntime(15225): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
06-09 20:46:19.413: E/AndroidRuntime(15225): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
06-09 20:46:19.413: E/AndroidRuntime(15225): at dalvik.system.NativeStart.main(Native Method)
06-09 20:46:50.327: I/Process(15225): Sending signal. PID: 15225 SIG: 9
+ 0 | - 0
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)