Android Question Trying my luck again - NFC - reading Credit Card Help is needed

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
hi,
i've tried and also posted a post in Jobs (for hiring a freelancer)
i need to read a credit card using NFC
i've searched everywhere but couldn't find an answer
i need a demo or a programmer to provide this code (with payment)
the need is very simple:
1. read track2
2. get all tags (or tags i will provide the list to the programmer)
all in one go of course
in B4A

any one can help with a sample or writing it ?
thanks
 

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
I can't see what you are responding to here. I assume that perhaps there has been some private conversation with Zeev and that his requirements cannot be met without some proprietary information. Correct?
He did respond in another post with an apk that showing some conversation with the card, nothing of the data I needed.
Any respond is blessed and contributes.
I am truly sorry he got hurt
This is not my intent and I apologize if he got hurt
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
What sort of errors? Are you willing to give me the library source to look at.
Libraries that it depends on (too big to upload):
1644157341320.png


B4A error:
Error:
B4A Version: 11.00
Parsing code.    (0.01s)
    Java Version: 11
Building folders structure.    (0.10s)
Compiling code.    (0.01s)
Compiling layouts code.    (0.02s)
Organizing libraries.    (0.00s)
    (AndroidX SDK)
Compiling resources    (1.05s)
Linking resources    (3.71s)
Compiling generated Java code.    (4.53s)
Convert byte code - optimized dex.    Error
trouble processing "java/io/Bits.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)
when not building a core library.
This is often due to inadvertently including a core library file
in your application's project, when using an IDE (such as
Eclipse). If you are sure you're not intentionally defining a
core class, then this is the most likely explanation of what's
going on.
However, you might actually be trying to define a class in a core
namespace, the source of which you may have taken, for example,
from a non-Android virtual machine project. This will most
assuredly not work. At a minimum, it jeopardizes the
compatibility of your app with future versions of the platform.
It is also often of questionable legality.
If you really intend to build a core library -- which is only
appropriate as part of creating a full virtual machine
distribution, as opposed to compiling an application -- then use
the "--core-library" option to suppress this error message.
If you go ahead and use "--core-library" but are in fact
building an application, then be forewarned that your application
will still fail to build or run, at some point. Please be
prepared for angry customers who find, for example, that your
application ceases to function once they upgrade their operating
system. You will be to blame for this problem.
If you are legitimately using some code that happens to be in a
core package, then the easiest safe alternative you have is to
repackage that code. That is, move the classes in question into
your own package namespace. This means that they will never be in
conflict with core system classes. JarJar is a tool that may help
you in this endeavor. If you find that you cannot do this, then
that is an indication that the path you are on will ultimately
lead to pain, suffering, grief, and lamentation.
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates boolean, but encountered type void
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates boolean, but encountered type void
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates boolean, but encountered type void
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates boolean, but encountered type void
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates int, but encountered type void
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates int, but encountered type void
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates int[], but encountered type void
Uncaught translation error: com.android.dx.cf.code.SimException: return type mismatch: prototype indicates int, but encountered type void
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Translation has been interrupted
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:692)
    at com.android.dx.command.dexer.Main.runMonoDex(Main.java:315)
    at com.android.dx.command.dexer.Main.runDx(Main.java:293)
    at com.android.dx.command.dexer.Main.main(Main.java:249)
    at com.android.dx.command.Main.main(Main.java:94)
Caused by: java.lang.InterruptedException: Too many errors
    at com.android.dx.command.dexer.Main.processAllFiles(Main.java:684)
    ... 4 more

I have tried to rename the "javax" classes to "jhs" but still getting the same errors when compiling the B4A project. The B4A library compiles without a problem (java 11)

B4A Code:

B4A:
#Region  Project Attributes
    #ApplicationLabel: B4A Example
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#ExcludeClasses: java.awt.font.NumericShaper
#ExcludeClasses: java.awt.font.TextAttribute
#ExcludeClasses: java.beans.ChangeListenerMap
#ExcludeClasses: java.beans.IndexedPropertyChangeEvent
#ExcludeClasses: java.beans.PropertyChangeEvent
#ExcludeClasses: java.beans.PropertyChangeListener
#ExcludeClasses: java.beans.PropertyChangeSupport

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    Private xui As XUI
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    
    Dim emv As readEMV
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("Layout")
    
    emv.Initialize("emv")
    
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Button1_Click
    emv.BeginScan
End Sub
 

Attachments

  • WrapperSource.zip
    137.8 KB · Views: 181
  • b4aReadEMV.zip
    1.1 KB · Views: 213
Last edited:
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
the data I want to read is a data that can be read from any nfc reader,
there is no guarantee. the card will provide what it is programmed to provide.
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Never got the explanations...
I have a sample app from a competitor that done it, on Android phone... so this is doable
Has nothing to do Wirth sensitive data etc
I have a limitation in my knowhow so asked for help
Even published in jobs, no one responded other than 2 who were not able to do that
nothing private. all in his multiple threads. the proprietary information required is available for many hundreds of thousands of pick-your-currency-unit. i have explained to him why he cannot base a commercial application on any library which cannot guarantee providing the data he requires.
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Later today I will post here relevant data on track2 and the tags
Maybe it will help you guys helping me
I want to thank each and every one trying to help me, it is not something I overlook and I really appreciate it
Regardless of the final results
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
Give a few minutes and will post it
I've had a look - I can see why you had trouble but I'm afraid the effort is too great for me to spend the time to try to fix it as I have no use for it myself.

Also it's free software released under the GNU General Public License version 2 which might have significant ramifications if used in a commercial application but IANAL.
 
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
I've had a look - I can see why you had trouble but I'm afraid the effort is too great for me to spend the time to try to fix it as I have no use for it myself.

Also it's free software released under the GNU General Public License version 2 which might have significant ramifications if used in a commercial application but IANAL.
IAANAL...just wanted to see if I could get it to work. Thanks for looking into it.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
hi,
i've tried and also posted a post in Jobs (for hiring a freelancer)
I replied to your message and sent you an email but it was ignored.

However, since other more experts have already tried with great difficulty, I don't even try
 
Last edited:
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
I replied to your message and sent you an email but it was ignored.

However, since other more experts have already tried with great difficulty, I don't even try
never got your mail, sorry
how did you sent it?
i even searched my span and you're not there
please resend
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
as said earlier
this is a sample track2
375510391000473=220320119038131112200
it is of a test card of course not a live one
the = (delimiter can be a letter as well like D etc)
as per the tags
9F1E is an 8 bytes alpha numeric value
another tag is 82 of 2 bytes


82
84
95
9A
9B
9C
9F02
9F07
9F09
9F10
9F21
9F26
9F27
9F33
9F34
9F35
9F36
9F37
9F39
9F40
9F0D
9F0E
9F0F
9F1A
5F34
5F2A

these are the required tags (if the tag does not exist then it can be ignored)
 
Upvote 0

moster67

Expert
Licensed User
Longtime User
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
unless you possess proprietary information and you're not saying, some of those tags you list contain data you cannot read (that is, decode or decipher, whichever may apply). furthermore, you cannot even access some of those tags unless the card will talk to you. the longer this conversation goes on, the clearer the picture gets for me.

i can see track 2, part of which is encoded, and i capture all your listed tags. except when i can't because i do not have certain data required by certain brands of cards. that a given app on play can read a particular card that i can't simply means the author has been working on the problem longer than i have and/or may have seen a card that i haven't. it has nothing to do with any programming platform. it's about obtaining proprietary data to unlock certain elements in the card, even if those elements may be inconsequential to the general public. in some cases it is possible to derive some of those proprietary data through trial and error.

so, is that what we're dealing with here? you have proprietary data? because there is no way the data pointed to by some of those tags is useful to anyone without it.
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
unless you possess proprietary information and you're not saying, some of those tags you list contain data you cannot read (that is, decode or decipher, whichever may apply). furthermore, you cannot even access some of those tags unless the card will talk to you. the longer this conversation goes on, the clearer the picture gets for me.

i can see track 2, part of which is encoded, and i capture all your listed tags. except when i can't because i do not have certain data required by certain brands of cards. that a given app on play can read a particular card that i can't simply means the author has been working on the problem longer than i have and/or may have seen a card that i haven't. it has nothing to do with any programming platform. it's about obtaining proprietary data to unlock certain elements in the card, even if those elements may be inconsequential to the general public. in some cases it is possible to derive some of those proprietary data through trial and error.

so, is that what we're dealing with here? you have proprietary data? because there is no way the data pointed to by some of those tags is useful to anyone without it.
thanks for your input.
it is my business - i process credit cards for the credit cards companies.
for me it is a technical only issue to read the data - i failed even to get the initial data due to my poor experience in b4a
so once i get the data i can move on
once again thank you for this
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
ah, i knew it. talking to you is like talking to a contactless credit card: if i ask the right question, i get the right answer. so, maybe we can arrange something. while i think, why don't you read some credit cards with the latest version of my little app (attached) and report to me. i had previously asked the forum for help with this, but only 1 member responded. now, with all this commotion about nfc, maybe it's a good time to re-post the project.

as for you, i still don't know exactly what you know. and just because it's your business to process credit cards, doesn't necessarily make you a programmer. in fact, i have
no particular issue with your taking advantage of my many hours of labor by asking to be shown how to talk to a card. i just needed to know where i stood. to wit: i am not responsible if, after i show you how to talk to the card, you are unable to get a particular card to talk to you (for the reasons i have explained ad nauseam). although, since you may actually possess proprietary data, the problem could be easier for you to solve than it is for me. in any case, you presented the problem as if you were going to incorporate what i might have provided in some commerical application of yours. that forces a level of responsibility on me (as i explained to you directly) that i was not willing to accept. if, on the other, this is for your amusement, that's a different story. just confirm that.

it's unfortunate so much time has been wasted through failure to communicate.
 

Attachments

  • vicino.zip
    270.9 KB · Views: 175
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
ah, i knew it. talking to you is like talking to a contactless credit card: if i ask the right question, i get the right answer. so, maybe we can arrange something. while i think, why don't you read some credit cards with the latest version of my little app (attached) and report to me. i had previously asked the forum for help with this, but only 1 member responded. now, with all this commotion about nfc, maybe it's a good time to re-post the project.

as for you, i still don't know exactly what you know. and just because it's your business to process credit cards, doesn't necessarily make you a programmer. in fact, i have
no particular issue with your taking advantage of my many hours of labor by asking to be shown how to talk to a card. i just needed to know where i stood. to wit: i am not responsible if, after i show you how to talk to the card, you are unable to get a particular card to talk to you (for the reasons i have explained ad nauseam). although, since you may actually possess proprietary data, the problem could be easier for you to solve than it is for me. in any case, you presented the problem as if you were going to incorporate what i might have provided in some commerical application of yours. that forces a level of responsibility on me (as i explained to you directly) that i was not willing to accept. if, on the other, this is for your amusement, that's a different story. just confirm that.

it's unfortunate so much time has been wasted through failure to communicate.
wow you got me lough so much with your starting sentences...
now, if you need me testing anything for you - i'm happy to do that.
your code is NOT going to be used in any of my commecial apps - it is for my learning ONLY
it is not really recommended to take something you don't understand and use it, and then on the first problem you're dead...
i must learn this, really.
then i can write my own code my own way
i admit - i'm a credit cards expert, known globally for my expertese and happy to have my reputation
as per programing - i'm ok...
programing on mobile i'm not even close to OK = i'm more of a rookie
so i learn, in my age learning goes slow i think
i will learn your code
should you want any input - just say what
we surely had some communications issue but i have a feeling we will end up good maybe even pals, ha?
to tomorrow your code will be on my desktop...
once again - thak you and all the other blokes that gave head and good will to help me
cheer to you all
 
Upvote 0

drgottjr

Expert
Licensed User
Longtime User
don't get your hopes up.
here is all i'm prepared to do at this time.
get something up and running and report a specific problem, if any. you may already know much, much more than i do about credit cards, so i am expecting you to be able to recognize and solve issues on your own.

if you come back with a problem, i don't want to see criticism of b4a or general lamentation because you can't get anywhere. specific problem with code and error log, if any. you seem to have made some progress, but it's hard to tell with all the whining.
 

Attachments

  • card.zip
    3.7 KB · Views: 188
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
don't get your hopes up.
here is all i'm prepared to do at this time.
get something up and running and report a specific problem, if any. you may already know much, much more than i do about credit cards, so i am expecting you to be able to recognize and solve issues on your own.

if you come back with a problem, i don't want to see criticism of b4a or general lamentation because you can't get anywhere. specific problem with code and error log, if any. you seem to have made some progress, but it's hard to tell with all the whining.
thanks once again
there is no and was no criticism on B4A - all i said that i couldn't resolve my problem and couldn't find any one that did it all the way
any ways - thanks and i will revert any way
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
don't get your hopes up.
here is all i'm prepared to do at this time.
get something up and running and report a specific problem, if any. you may already know much, much more than i do about credit cards, so i am expecting you to be able to recognize and solve issues on your own.

if you come back with a problem, i don't want to see criticism of b4a or general lamentation because you can't get anywhere. specific problem with code and error log, if any. you seem to have made some progress, but it's hard to tell with all the whining.
hi

first
your vicino6 app works and did manage to "talk" to cards
i challenged it with a few cards some of them not setup for NFC and it managed to work with them all properly
the result were hex values i couldn't interpret but it was different for each card so i guess it did read properly

second - now i really feel totally lost and frustrated
tried to understand the text you sent in card.txt
then tried to implement it in a small program but there were too many errors on declarations that i didn't know how to resolve (due to my lack of knowledge)
as said earlier - i am not "OK" even in programming on mobile
so after multiple efforts that led to nowhere i had to leave it

that was the original idea for me to offer this in Jobs and pay a programmer that will write this piece of code either as function or library
this part is what holding me back unfortunately
so once again if i could find someone to do it in the most simple way - return back track2 and tags list & their values it would be very helpful
 
Upvote 0
Top