• 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: RoArm M2 4 DOF High Torque Serial Bus Servo ROS2 WIFI ESP NOW UART USB ST3235 QMI8658C For ESP32 ESP32 MLX90640 Ra ESP32 C3 Round LCD Development Board Electronic EYE 0.71 inch Display Watch Screen GC9A01 160x160 Code Supports Night Vision Raspberry Pi 5 Sound Card MPTPU Raspberry Pi 5 TPU AI Kit 2TOPS PCIe to TPU HAT Pi5 For Google Coral Edge TPU D-Robotics RDK X3 Development Board Horizon Sunrise Pi ARM Cortex-A53 5Tops 2GB/4GB RAM Programmable Magnetic Encoder 树莓派Pico 2 RP2350B-Plus-W开发板WIFI官方Radio Module 2 Raspberry Pi 5 Sound Sensor ESP32 S3 4inch LCD Development Board 480x480 TouchScreen Display TVBOX LVGL HMI Sensor CAN RS485 Raspberry Pi 5 D SpotPear ESP32-S3 Round Screen 800×480 Image extraction User Guide Serial UART Bus Servo ST3020 TTL 25KG.CM Magnetic-Encoder High precision and Large torque