appfoundry / android-nfc-lib Goto Github PK
View Code? Open in Web Editor NEWNFC library for Android
License: MIT License
NFC library for Android
License: MIT License
The message is received without the first character.
For example:
I sent -> "Beam me up, Android!" -> I receive -> "eam me up, Android!"
@OverRide
public void callbackWithReturnValue(Boolean result) {
String message = result ? "Success" : "Failed!";
Toast.makeText(this,message,Toast.LENGTH_SHORT).show();
}
@Override
public void onProgressUpdate(Boolean... booleans) {
Toast.makeText(this, booleans[0] ? "We started writing" : "We could not write!",Toast.LENGTH_SHORT).show();
}
@Override
public void onError(Exception e) {
Toast.makeText(this,e.getMessage(),Toast.LENGTH_SHORT).show();
}
In this code @OverRide doesnt work (my IDE doesnt let me do it)
hi,
when i use your library in my program i have to set onNewIntent
in MainActivity and when i want to write tag i should access this from fragment...... i solved some of small problem by providing middle class and transfer some data between MainActivity and fragment .... but i encounter with this :
public boolean performWrite(NfcWriteUtility writeUtility) throws ReadOnlyTagException,InsufficientCapacityException, TagNotPresentException, FormatException { return writeUtility.writeTelToTagFromIntent(text,LogHolder.fragment_1_activity.getIntent()); }
and as you can see i provide MainActivity's activity by that middle class(LogHolder) but i get error :
Encountered an error ! be.appfoundry.nfclibrary.exceptions.TagNotPresentException: Intent does not contain a tag
i stock here i can't do more ..... help me plz :))
How to set password before write the new tag?
Hi, first thanks for this library. I was able to implement reading/writing NFC tags in very short time with it ๐
Lately I had trouble using my smartphone on a payment terminal, where I wanted to pay with Google Pay. Could it be that Google Pay doesn't work when an app is on background which uses android-nfc-lib? My smartphone didn't react on the payment terminal, I tried multiple times. After I uninstalled the app the payment was successful.
I'm using the "extend NfcActivity
" way. You may want to have a look at my sources: MainActivity.java, AndroidManifest.xml.
I do not have too much of a clue of the technical side here (that's why I'm using this library). Maybe you have an explanation for this?
Can you tell me if it is possible to erase tag using that lib? I mean also not to write for example empty String.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.