All Projects → skjolber → Ndef Tools For Android

skjolber / Ndef Tools For Android

Licence: apache-2.0
NDEF Tools for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Ndef Tools For Android

Easydeviceinfo
📱 [Android Library] Get device information in a super easy way.
Stars: ✭ 1,698 (+1402.65%)
Mutual labels:  nfc, library
Overrideit Sketchplugin
Overrideit is sketch plugin that allow designers to search in overridelist and overrides dropdowns, and with many other features.
Stars: ✭ 113 (+0%)
Mutual labels:  library
Yaep
Yet Another Earley Parser
Stars: ✭ 110 (-2.65%)
Mutual labels:  library
Battery.js
A tiny wrapper for the HTML5 Battery Status API.
Stars: ✭ 111 (-1.77%)
Mutual labels:  library
Olingo Odata4
Mirror of Apache Olingo
Stars: ✭ 110 (-2.65%)
Mutual labels:  library
Colibri Core
Colibri core is an NLP tool as well as a C++ and Python library for working with basic linguistic constructions such as n-grams and skipgrams (i.e patterns with one or more gaps, either of fixed or dynamic size) in a quick and memory-efficient way. At the core is the tool ``colibri-patternmodeller`` whi ch allows you to build, view, manipulate and query pattern models.
Stars: ✭ 112 (-0.88%)
Mutual labels:  library
Py7zr
7zip in python3 with ZStandard, PPMd, LZMA2, LZMA1, Delta, BCJ, BZip2, and Deflate compressions, and AES encryption.
Stars: ✭ 110 (-2.65%)
Mutual labels:  library
Hypre
See https://github.com/hypre-space/hypre for the development repository and releases. This repo will eventually be removed.
Stars: ✭ 113 (+0%)
Mutual labels:  library
Redis Store
Namespaced Rack::Session, Rack::Cache, I18n and cache Redis stores for Ruby web frameworks
Stars: ✭ 1,466 (+1197.35%)
Mutual labels:  library
Inapppy
Python In-app purchase validator for Apple AppStore and GooglePlay.
Stars: ✭ 110 (-2.65%)
Mutual labels:  library
Esp32 Mpu Driver
ESP32 full library for all MPU6000 MPU6050 MPU6500 MPU9150 MPU9250 with SPI and I2C support and more.
Stars: ✭ 111 (-1.77%)
Mutual labels:  library
Vrt
🔅 Ray tracing library for Vulkan API (indev)
Stars: ✭ 111 (-1.77%)
Mutual labels:  library
Deepcopy.js
deep copy data
Stars: ✭ 112 (-0.88%)
Mutual labels:  library
Libbrotli
meta project to build libraries from the brotli source code
Stars: ✭ 110 (-2.65%)
Mutual labels:  library
Petal
A modern, light CSS UI framework by Shakr
Stars: ✭ 113 (+0%)
Mutual labels:  library
Chocobar
The usual Snackbar with more 🍫 and colours 🎉
Stars: ✭ 110 (-2.65%)
Mutual labels:  library
Lift
constexpr C++17 library for simplifying higher order functions in application code
Stars: ✭ 111 (-1.77%)
Mutual labels:  library
Androidaudiorecorder
A fancy audio recorder lib for Android. Supports WAV format at 48kHz.
Stars: ✭ 1,524 (+1248.67%)
Mutual labels:  library
Tls Channel
A Java library that implements a ByteChannel interface over SSLEngine, enabling easy-to-use (socket-like) TLS for Java applications.
Stars: ✭ 113 (+0%)
Mutual labels:  library
Php Cli
PHP library to build command line tools
Stars: ✭ 113 (+0%)
Mutual labels:  library

Overview

This site hosts a library for Near Field Communication on Android using the NDEF format.

The current (version <= 10.0) Android SDK only comes with a low-level NDEF API which does not expose developers to the full potential of the NDEF format. Rather than sweating over byte arrays, developers should have access to high-level representations.

Features:

  • NDEF object representation library (no more byte arrays!)
    • Simple conversion to and from Android SDK low-level equivalent
  • JSE module with the corresponding Android classes for use in regular Java

In short, this projects helps you to handle dynamic NDEF content at runtime.

License

Apache 2.0

Obtain

The project is built with Gradle and is available on the central Maven repository. For Gradle, configure the property

ext {
  ndefToolsForAndroidVersion = '2.0.0'
}

and add the dependency

api("com.github.skjolber.ndef-tools-for-android:ndeftools:${ndefToolsForAndroidVersion}")

Usage

So a Message consists of a list of Records in the NDEF standard. Browse the source for an overview of supported record types.

Creating new NDEF records

Compose an Android Application Record:

AndroidApplicationRecord aar = new AndroidApplicationRecord();
aar.setPackageName("org.ndeftools.boilerplate");

Compose a Mime Record

MimeRecord mimeRecord = new MimeRecord();
mimeRecord.setMimeType("text/plain");
mimeRecord.setData("This is my data".getBytes("UTF-8"));

Create new NDEF message

From above, simply

Message message = new Message(); //  com.github.skjolber.ndef.Message
message.add(androidApplicationRecord);
message.add(mimeRecord);

or from bytes

byte[] messageBytes = ...; // get your bytes
Message message = Message.parseNdefMessage(messageBytes);

Converting to and from native Android NdefMessage

Use

NdefMessage lowLevel = ...; // get from existing code
Message highLevel = new Message(lowLevel);
// read from high-level records

or

Message highLevel = ...// compose high-level records
NdefMessage lowLevel = highLevel.getNdefMessage();
// .. pass low-level NdefMessage to existing code

JSE module

A few NFC classes copied from the Android open source project, so that the NDEF library can be used on regular Java (i.e. Java 8 or 11).

Example

For a working example see android-nfc-lifecycle-wrapper.

See also

For a graphical NDEF editor, try NFC Eclipse plugin. It creates static NDEF content, and so is good for getting to know the NDEF format. Recommended for developers new to NFC.

Acknowledgements

This project springs out the NFC Tools for Java and NFC Eclipse plugin projects.

History

August 2020: Version 2.0.0 maintainance release:

  • Maven coordinates updated; group is now com.github.skjolber.ndef-tools-for-android
  • Packages renamed to com.github.skjolber.ndef
  • Added Gradle build (now dual builds with Maven)
  • Moved utilities and examples to seperate project
  • Minor improvements

March 28th 2013: Version 1.2.3 released.
February 5th 2013: Version 1.2.2 released.
January 1st 2013: Version 1.2.1 released.
October 18th 2012: Version 1.2 released.
September 15th 2012: Initial release.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].