flutter_nfc_mynumber

Flutter plugin for accessing the Japanese Mynumber features on Android and iOS.

Setup

Android Setup

iOS Setup

  1. D392F000260100000001
  2. D3921000310001010408
  3. D3921000310001010100
  4. D3921000310001010401

Usage

import 'package:flutter_nfc_mynumber/flutter_nfc_mynumber.dart';
import 'package:flutter_nfc_mynumber/mynumber_util.dart';

var nfcAvailability = await FlutterNfcMynumber.nfcAvailability;
if (availability != NFCAvailability.available) {
    // oh-no
}

try{
  await FlutterNfcMynumber.startSession();

  await FlutterNfcMynumber.setIosAlertMessage("connecting...");

  // get retry count
  await MynumberUtil.getAuthPinRetryCount();
  await MynumberUtil.getSigningPinRetryCount();

  // get signature value
  await MynumberUtil.getSignatureByAuthPassword("password", "digestValue");
  await MynumberUtil.getSignatureBySigningPassword("password", "digestValue");

  // send original APDU command.
  await FlutterNfcMynumber.transceive(Uint8List.fromList([0x00, 0xB0, 0x00, 0x00, 0x04]))
} catch (e) {}

await FlutterNfcMynumber.finishSession();

A more complicated example can be seen in example dir.

Special Thanks to