• 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: RISC-V DeepSeek AI Voice Chat Camera Robot BOX ESP32-S3 Development Board 2 inch LCD N16R8 Touchscreen Display Camera Raspberry Pi 6.25 inch DSI Display MIPI LCD Capacitive TouchScreen 720x1560 Zero LCD HAT (A) pcb800099-v.9 Raspberry Pi 4B Raspberry Pi Autofocus Camera Tang Nano Series FPGA FAQ Raspberry Pi Raspberry Pi Pico 2 RP2350 With 0.96 inch LCD Display 0.96inch Screen 160×80 Onboard RP2350A EPS32S3 1.8inch Round LCD Display WIFI-AIDA64-Secondary-TouchScreen/Wireless-Power/Video-Player LVGL Argon 1.69inch LCD TouchScreen Display 240×280 ST7789 Arduino Raspberry Pi ESP32S3 Pico STM32 DeepSeek AI Voice Chat Robot ESP32 S3 Camera Object Recognition Development Board N16R8 For Xiaozhi Dual microphone interruption Luckfox Pico LCD Raspberry Pi Pico rp2040 Display image 1.3inch LCD ST7789 change bmp to hex ESP32-P4-ETH RJ45 POE DSI/MIPI 10.1 inch LCD Display Touchscreen/CSI Camera/Audio Speaker AI Deepseek ESP32-S3 Development Board 1.85 inch Round LCD N16R8 DeepSeek AI Voice Chat Robot BOX Magnetic-charging ESP32 Google Dinosaur game Industrial USB HUB USB3.2 Gen1 One-To-4U Onboard 7~36V DC power port For Multi Systems