Tauri Integration (version 2.1) - Nov 25th 2021

Tauri Integration (version 2.1) - Nov 25th 2021

Technical Documentation for Integration- TAURI - Version 2.1

 

 Table of Contents

TAURI API Definition 3

For Tauri 3.1.1 and below 3
For Tauri 3.1.1 and above 4
Examples of data and server coding 5

Application Switch  8


 TAURI JSON/API Definition

For Tauri 3.1.1 and below

 

Introduction:

 

This document provides a description on how to utilize Tauri’s JSON/API feature into third party applications.

 

 

 

How to access API in Tauri app:

 

1. Press and hold for 5 seconds for the setting menu to pop up

2. 0000 is the default password

3. Tap 5 times at the TAURI logo at the right side in settings

4. Select Extract data from API

5. Enter the desire URL that you want the data to be sent to

 

Translation table:

 

No

JSON

Definition

1

“result”

If the result is within the temperature range that was set inside the app. Within range = pass, out of range = fail

2

“serialNumber”

Device serial number

3

“temperature”

Temperature detected in Celsius

4

mask

True = mask on, False = mask off, Null = mask option has not been activated in Tauri

 

Example:

 

{"mask":false,"result":"pass","serialNumber":"GS156180600010","temperature":36.38926


For a device with serial number GS156180600010 with a people coming in at a temperature of 36.38926 which is not wearing a mask but allow access.


TAURI Form-data/API Definition

For Tauri 3.1.1 and above

 

NOTE: Version 3.1.1 has changed from JSON format to form-data

 

Introduction:

 

This document provides a description on how to utilize Tauri’s form-data/API feature into third party applications.

 


ow to access API in Tauri app:

 

1. Press and hold for 5 seconds for the setting menu to pop up

2. 0000 is the default password

3. Tap 5 times at the TAURI logo at the right side in settings

4. Select Extract data from API

5. Enter the desire URL that you want the data to be sent to

 

Translation table:

 

No

Form-data

Definition

1

“result”

If the result is within the temperature range that was set inside the app. Within range = pass, out of range = fail

2

“serialNumber”

Device serial number

3

“temperature”

Temperature detected in Celsius

4

“mask”

True = mask on, False = mask off, Null = mask option has not been activated in Tauri

5

“userName”

Name of user if their facial info has been inputed into the application, if not it will show as null

6

“userGroup”

Name of user group according to what was entered into the application

7

“userInfo”

User info that was setup when inputing facial info into the application

8

file

Real time snapshot of the scanned person

 

Example of data sent from Tauri:



Example of sever receiving from form-data sent by Tauri:

 

package com.qx.project.system.controller;

import com.qx.common.utils.StringUtils;
import com.qx.common.utils.poi.ExcelUtil;
import com.qx.framework.web.controller.BaseController;
import com.qx.framework.web.domain.AjaxResult;
import com.qx.project.api.BaseFileController;
import com.qx.project.system.domain.Demo;
import com.qx.project.system.service.IDemoService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
* @program: Project
* @description
* @author: kerr
* @create: 2020-08-11 10:45
**/
@RestController
@RequestMapping("/system/demo")
public class DemoController
extends BaseController {
protected final Logger logger = LoggerFactory.getLogger(DemoController.class);
@Autowired
private IDemoService demoService;

@GetMapping("/list")
public Map<String, Object> list(Demo demo) {

Map<String, Object> resultMap = new HashMap();
Integer count = this.demoService.queryCount();
resultMap.put("num" , count);
List<Demo> list = this.demoService.selectDemoList(demo);
if ((list != null) && (list.size() > 0)) {
resultMap.put("demo" , list.get(0));
}
return resultMap;
}

@GetMapping("/export")
public AjaxResult export(Demo demo) {
List<Demo> list = this.demoService.selectDemoList(demo);
ExcelUtil<Demo> util = new ExcelUtil(Demo.class);
return util.exportExcel(list, "demo");
}

@GetMapping("/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id) {
return AjaxResult.success(this.demoService.selectDemoById(id));
}

@PostMapping
public AjaxResult add(Demo demo,@RequestParam("file") MultipartFile file) {
if(file != null){
//需要存储图片
String s = BaseFileController.saveFile(file, 11);
if(StringUtils.isNotBlank(s)){
demo.setImgPath(s);
}
}

demo.setIsQuery("0");
return toAjax(this.demoService.insertDemo(demo));
}

@PutMapping
public AjaxResult edit(@RequestBody Demo demo) {
return toAjax(this.demoService.updateDemo(demo));
}

@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids) {
return toAjax(this.demoService.deleteDemoByIds(ids));
}
}

  

Version 3.2.8 and after

This version has now added more api with vaccine verify data, see the following table for the additional data that can be retrieved.

No

Form-data

Definition

1

“name”

name of person

2

“doses”

number of doses taken

3

“injectionDate”

date of last injection

4

“vaccineVenue”

location of where vaccine has been taken

5

“vaccineBatch”

vaccine batch

6

“country”

country of where vaccine was taken (for Europe only)

7

“birth”

birthdate of person

8

“type”

0 = no reaction/1 = Smarthealth code/2=Euro QR code




Application Switch

For Tauri 3.1.1 and above

 

Introduction:

 

The following is for developer who has their own application and would like to change between their application and Tauri.


From developer application to Tauri:

 

This requires the developer app to embed the following into their application in order for it to switch Tauri:

 

For initial switch after bootup:

 

ComponentName componetName = new ComponentName("com.glorystar.tauri", "com.glorystar.tauri.activity.SplashActivity");
intent.setComponent(componetName);
startActivity(intent);

 

After intial switch to the Tauri application, can use the following to enter Tauri quicker:

 

intent.setAction("android.intent.action.CHECK_TEMPERATURE");
ComponentName componetName = new ComponentName("com.glorystar.tauri", "com.glorystar.tauri.activity.MainActivity");
intent.setComponent(componetName);
startActivity(intent);

 

Tauri to developer application:

 

After detecting the temperature of the person, the Tauri application will close itself which jumps back to the default app set by Staros. This can be setup by going to the Tauri settings at Extension – External App Mode – Enable

 

Note that after enabling this extension, other extension features such as printing, relay will not be selectable.

 

 




    • Related Articles

    • Update TAURI

      We received the unit with 3.0.2. we need APK for 3.1.2.  Answer  The most updated version of our Tauri is V3.2.6 You can check the update of the firmware of Tauri with internet connected and updating by OTA update. Go to settings, enter the password ...
    • Tauri 7" update firmware and connecting to Star Control / Tauri Cloud

      Problem We want to test with the Star Control and Tauri Cloud for a customer of us who asked for regular reporting. 1) First of all I want to update the Tauri 7" to the most recent version. but update firmware doesn't work. I can start the update. ...
    • 3.2.8 Release (For Tauri and Vaccine Verify)

      3.2.8 update Applicable models: TAURI101/156/215/7 and TAURI Vaccine Verify series New Features: 1. Europe Vaccine QR Code Update to support newest framework to support more location (eg. Ireland) 2. Vaccine Code API Added vaccine code API that Tauri ...
    • Over the air updates to 3.2.3 without Tauri Cloud expire by October 31, 2021

      06/23/2021 Please be advised that all over the air updates without Tauri Cloud to 3.2.3 will be expire by October 31, 2021, after updates to 3.2.3 additional over the air updates will need to be through Tauri Cloud. Firmware and application will be ...
    • Issue Tauri 7"

      Q: If my device shows black screen with coding what should I do? A: You need to provide your device serial number to our support. Please contact support@glortystargroup.com for firmware update support