Create new Android Application NFC Record - Android Network

Android examples for Network:NFC Record

Description

Create new Android Application NFC Record

Demo Code


//package com.java2s;

import android.content.Context;

import android.nfc.NdefRecord;

public class Main {
    public static NdefRecord newAndroidApplicationRecord(String packageName) {
        return NdefRecord.createApplicationRecord(packageName);
    }//from w  ww.  j av  a  2s . c  o  m

    public static NdefRecord newAndroidApplicationRecord(Context context) {
        return newAndroidApplicationRecord(context.getPackageName());
    }
}

Related Tutorials