{"id":18141540,"url":"https://github.com/skjolber/ndef-tools-for-android","last_synced_at":"2025-04-10T01:09:17.068Z","repository":{"id":28785670,"uuid":"32308400","full_name":"skjolber/ndef-tools-for-android","owner":"skjolber","description":"NDEF Tools for Android","archived":false,"fork":false,"pushed_at":"2024-04-13T09:42:19.000Z","size":1856,"stargazers_count":149,"open_issues_count":1,"forks_count":40,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-10T01:09:11.358Z","etag":null,"topics":["android","library","ndef","ndef-format","nfc"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skjolber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-16T07:32:58.000Z","updated_at":"2025-04-03T19:55:11.000Z","dependencies_parsed_at":"2024-12-26T12:07:23.071Z","dependency_job_id":"dc96176c-236c-4721-8551-2d95f0324feb","html_url":"https://github.com/skjolber/ndef-tools-for-android","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fndef-tools-for-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fndef-tools-for-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fndef-tools-for-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skjolber%2Fndef-tools-for-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skjolber","download_url":"https://codeload.github.com/skjolber/ndef-tools-for-android/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248137886,"owners_count":21053775,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","library","ndef","ndef-format","nfc"],"created_at":"2024-11-01T17:07:33.574Z","updated_at":"2025-04-10T01:09:17.045Z","avatar_url":"https://github.com/skjolber.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Build Status](https://github.com/skjolber/ndef-tools-for-android/actions/workflows/android.yml/badge.svg) \n[![Maven Central](https://img.shields.io/maven-central/v/com.github.skjolber.ndef-tools-for-android/ndeftools.svg)](https://mvnrepository.com/artifact/com.github.skjolber.ndef-tools-for-android/ndeftools)\n\n# Overview\nThis site hosts a library for [Near Field Communication](http://en.wikipedia.org/wiki/Near_field_communication) on [Android](http://www.android.com/) using the [NDEF](http://developer.android.com/reference/android/nfc/tech/Ndef.html) format.\n\nThe current (version \u003c= 14.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.\n\nFeatures:\n  * NDEF object representation library (no more byte arrays!)\n    * Simple conversion to and from Android SDK low-level equivalent\n  * JSE module with the corresponding Android classes for use in regular Java\n\nIn short, this projects helps you to handle __dynamic NDEF content__ at runtime.\n\n## License\nApache 2.0\n\n## Obtain\nThe project is built with [Gradle] and is available on the central Maven repository.  For Gradle, configure the property\n\n```groovy\next {\n  ndefToolsForAndroidVersion = '2.0.1'\n}\n```\n\nand add the dependency\n\n```groovy\napi(\"com.github.skjolber.ndef-tools-for-android:ndeftools:${ndefToolsForAndroidVersion}\")\n```\n\n# Usage\nSo a [Message](https://github.com/skjolber/ndef-tools-for-android/blob/master/ndef/src/main/java/com/github/skjolber/ndef/Message.java) consists of a list of [Records](https://github.com/skjolber/ndef-tools-for-android/blob/master/ndef/src/main/java/com/github/skjolber/ndef/Record.java) in the NDEF standard. Browse the [source](https://github.com/skjolber/ndef-tools-for-android/tree/master/ndef/src/main/java/com/github/skjolber/ndef) for an overview of supported record types.\n\n## Creating new NDEF records\nCompose an [Android Application Record](http://developer.android.com/guide/topics/connectivity/nfc/nfc.html#aar):\n\n```java\nAndroidApplicationRecord aar = new AndroidApplicationRecord();\naar.setPackageName(\"org.ndeftools.boilerplate\");\n```\n\nCompose a Mime Record\n```java\nMimeRecord mimeRecord = new MimeRecord();\nmimeRecord.setMimeType(\"text/plain\");\nmimeRecord.setData(\"This is my data\".getBytes(\"UTF-8\"));\n```\n\n## Create new NDEF message\nFrom above, simply\n\n```java\nMessage message = new Message(); //  com.github.skjolber.ndef.Message\nmessage.add(androidApplicationRecord);\nmessage.add(mimeRecord);\n```\nor from bytes\n\n```java\nbyte[] messageBytes = ...; // get your bytes\nMessage message = Message.parseNdefMessage(messageBytes);\n```\n\n## Converting to and from native Android [NdefMessage](http://developer.android.com/reference/android/nfc/NdefMessage.html)\nUse\n\n```java\nNdefMessage lowLevel = ...; // get from existing code\nMessage highLevel = new Message(lowLevel);\n// read from high-level records\n```\nor\n\n```java\nMessage highLevel = ...// compose high-level records\nNdefMessage lowLevel = highLevel.getNdefMessage();\n// .. pass low-level NdefMessage to existing code\n```\n\n# JSE module\nA 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). \n\n# Example\nFor a working example see [android-nfc-lifecycle-wrapper](https://github.com/skjolber/android-nfc-lifecycle-wrapper).\n\n# See also\nFor a graphical NDEF editor, try [NFC Eclipse plugin](https://github.com/skjolber/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.\n\n# Acknowledgements\nThis project springs out the [NFC Tools for Java](https://github.com/grundid/nfctools) and [NFC Eclipse plugin](https://github.com/skjolber/nfc-eclipse-plugin) projects.\n\n# History\nApril 2024: Version 2.0.1 maintenance release.\n\nAugust 2020: Version 2.0.0 maintenance release: \n  * Maven coordinates updated; group is now `com.github.skjolber.ndef-tools-for-android`\n  * Packages renamed to `com.github.skjolber.ndef`\n  * Added Gradle build (now dual builds with Maven)\n  * Moved utilities and examples to [seperate project](https://github.com/skjolber/android-nfc-lifecycle-wrapper)\n  * Minor improvements\n\nMarch 28th 2013: Version 1.2.3 released.\u003cbr\u003e\nFebruary 5th 2013: Version 1.2.2 released.\u003cbr\u003e\nJanuary 1st 2013: Version 1.2.1 released.\u003cbr\u003e\nOctober 18th 2012: Version 1.2 released.\u003cbr\u003e\nSeptember 15th 2012: Initial release.\u003cbr\u003e\n\n\n[Apache 2.0]:           https://www.apache.org/licenses/LICENSE-2.0.html\n[issue-tracker]:        https://github.com/skjolber/android-nfc-lifecycle-wrapper/issues\n[Gradle]:                   https://gradle.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskjolber%2Fndef-tools-for-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskjolber%2Fndef-tools-for-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskjolber%2Fndef-tools-for-android/lists"}