• sales

    +86-0755-88291180

Android SDK for NFC-Powered e-Paper

Import the .jar file

  • Download the SDK
    • Download the SDK and unzip it to get the .jar file
    • NFC SDK
  • Copy the Jar file to libs directory of your project.



  • Find the .jar file in your project, right-click it to add it as libraries.
 


  • After adding, the line will bee auto-added to build.gradle.:


Use guide

There are two functions provided, one is send function and any is status function.

Sent function

    Type
    Typee-Paper
    12.13inch
    22.9inch
    34.2inch
    47.5inch
    57.5inch HD
    62.7inch
    Pictures
    Typee-Paperwidthheight
    12.13inch250122
    22.9inch296128
    34.2inch400300
    47.5inch800480
    57.5inch HD880528
    62.7inch264176

    Status function

      • int b()
      • Return:
        • 0-100:The current process of sending.
        • -1:Failed

      Examples

      protected void onNewIntent(Intent intent) {//Recognized the NFC
          if (mWriteMode && NfcAdapter.ACTION_TAG_DISCOVERED.equals(intent.getAction())) {
              detectedTag = intent.getParcelableExtra(NfcAdapter.EXTRA_TAG);
              String[] tech = detectedTag.getTechList();//Get the descriptor
              if(tech[0].equals("android.nfc.tech.NfcA")) {//if the descriptor is correct
                  Thread t = new Thread() {//Create an new thread
                      @Override
                      public void run() {
                          Boolean success = false;
                          NfcA tntag;//NFC tag
      
                          final a  a = new a();//Create a new instance.
                          a.a();//初始化发送函数
      
                          Thread thread = new Thread(new Runnable() {//Create thread
                              @Override
                              public void run() {
                                  EPD_total_progress = 0;
                                  while(EPD_total_progress != -1){
                                      EPD_total_progress = a.b();//Read the process
                                      if(EPD_total_progress == -1){
                                          break;
                                      }
                                      setStatusBody(getString(R.string.txing) + EPD_total_progress +"%");
                                      if(EPD_total_progress == 100 ){
                                          break;
                                      }
                                      SystemClock.sleep(10);
                                  }
                              }
                          });
                          thread.start();//start the thread
                          tntag = NfcA.get(detectedTag);//Get the tag instance.
                          try {
                              int whether_succeed = a.a(tntag,Size_Flag, bmp_send);//Send picture
                              if(whether_succeed == 1){
                                  success = true; 
      
                                  runOnUiThread(new Runnable() {
                                      @Override
                                      public void run() {
                                          checkNFCpopwindow.dismiss(); //Tips
      
                                      }
                                  });
                                  Success_Sound_Effects();
      
                              }else{
                                  setStatusBody(getString(R.string.txfail));
                              }
      
                          } finally { 
                              try {
                                  if (success == false) {
                                      setStatusBody(getString(R.string.txfail));
                                      runOnUiThread(new Runnable() {
                                          @Override
                                          public void run() {
                                              checkNFCpopwindow.dismiss();
                                          }
                                      });
                                  }
                                  tntag.close();
                              } catch (IOException e) {//handle exception error
                                  e.printStackTrace();
                              }
                          }
                      }
                  };
                  t.start();//Start thread
              }
          }
      }
      TAG: SpotPear Raspberry Pi 1.3inch LCD Raspberry Pi 5 PCIe to M.2 Multi Function Adapter Board Supports Dual 4K HDMI Output LuckFox Pico pro Raspberry Pi Pico 2 RP2350B 3.49-inch capacitive TouchCcree 3.49inch LCD display development board 172×640 RM520N GL 5G/4G/3G M.2 Moudle IoT EMBB For LTE-A/NSA/SA And GNSS For DFOTA /VoLTE For Quectel Raspberry Pi 5 Box Case Ki-A PCIe to RJ45 Gigabit Ethernet All Ports To Pi's USB Side Jetson Nano USB to UART ADXL357BEZ Laser 450nm 5W high precision module Adjustable focal length For Laser Carving / Laser 3D Printing Arduino Thermal imaging camera ESP32 Development Board WiFi+Bluetooth Ultra Low Power Dual Core ESP 32S ESP 32 Similar ESP8266 Argon Neo 5 4.26inch-e-Paper Industrial USB TO RS232/485 (C) UART FT232RNL 2m For 3.3V / 5V For Switchable RS232/RS485 ISX031C GMSL Camera H100 Image Sensor IP67 protection rating For Jetson Orin And MAX9296 GMSL camera Raspberry Pi Zero 2W Dual Ethernet Expansion Board USB Hub Expansion RJ45 Raspberry Pi Camera V2 Bevelopment Board