-
Notifications
You must be signed in to change notification settings - Fork 14
Native bridge
Artur Słomowski edited this page Jun 21, 2020
·
1 revision
Web application uses native bridge contract to send or receive data from native device. It uses following functions:
- setBridgeData
- getBridgeData
- onBridgeData
- function setBridgeData(dataType: Int, data: String)
- dataType = 1
- data
{
"timestamp": 1589669050
}
- function getBridgeData(dataType: Int, data: String, requestId: String)
- dataType = 2
- data = null
- function bridgeDataResponse(body: String, dataType: Int, requestId: String)
- dataType = 2
- body
{ DATA_FROM_NOTIFICATION }
- function setBridgeData(dataType: Int, data: String)
- dataType = 37
- data
{
"clearBtData": true/false
}
- function setBridgeData(dataType: Int, data: String)
- dataType = 43
- data
{
"pin": "123ABC"
}
- function onBridgeData(dataType: Int, data: String)
- dataType = 43
- data
{
"result": 1 - ok, 2 - error, 3 - other problem
}
- function setBridgeData(dataType: Int, data: String)
- dataType = 52
- data
{
"enableExposureNotificationService": true/false, //optional
"enableBt": true/false, //optional
"enableLocation": true/false, //optional
"enableNotification": true/false //optional
}
- function getBridgeData(dataType: Int, data: String, requestId: String)
- dataType = 51
- data = null
- function bridgeDataResponse(body: String, dataType: Int, requestId: String)
- function onBridgeData(dataType: Int, data: String)
- dataType = 51
- data
{
"servicesStatus": {
"exposureNotificationStatus": 1 - ON, 2 - OFF, 3 - NOT SUPPORTED
"isLocationOn": true/false, //only Android
"isBtOn": true/false,
"isNotificationEnabled": true/false
}
}
- function getBridgeData(dataType: Int, data: String, requestId: String)
- dataType = 61
- data = null
- function bridgeDataResponse(body: String, dataType: Int, requestId: String)
- function onBridgeData(dataType: Int, data: String)
- dataType = 61
- data
{
"riskLevel": 1 //1- no risk, 2-middle risk, 3-high risk
}
Web documentation
About ProteGo
- Introduction
- SARS-CoV-2 infection risk groups
- Anonymity and security
- Further principles
- Version 2.0 functionalities scope
- Version 3.0 functionalities scope
- Version 4.0 functionalities scope
- ProteGO Safe and it’s documentation is licensed under
- Dictionary
Contributing
- How to contribute
- Code of conduct
- Feature request template
- Pull request template
- Issue template
- Security
- Support
- Contributors
- License
ProteGo Repositories