Google Chat: zj734465502@gmail.com
+86-0755-88291180
sales01@spotpear.com
dragon_manager@163.com
services01@spotpear.com
manager01@spotpear.com
WhatsApp:13246739196
There are two functions provided, one is send function and any is status function.
Type | e-Paper |
---|---|
1 | 2.13inch |
2 | 2.9inch |
3 | 4.2inch |
4 | 7.5inch |
5 | 7.5inch HD |
6 | 2.7inch |
Type | e-Paper | width | height |
---|---|---|---|
1 | 2.13inch | 250 | 122 |
2 | 2.9inch | 296 | 128 |
3 | 4.2inch | 400 | 300 |
4 | 7.5inch | 800 | 480 |
5 | 7.5inch HD | 880 | 528 |
6 | 2.7inch | 264 | 176 |
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 } } }