blob: 4becc2470b0c50f561d1351811864fb936e484b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
package com.ihealth.ihealthlibrary;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.bridge.ReactContextBaseJavaModule;
import com.facebook.react.module.annotations.ReactModule;
import com.ihealth.communication.control.TS28BProfile;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Nullable;
@ReactModule(name = "TS28BProfileModule")
public class TS28BProfileModule extends ReactContextBaseJavaModule {
private static final String modelName = "TS28BProfileModule";
private static final String TAG = "TS28BProfileModule";
private static final String ACTION_MEASUREMENT_RESULT = "ACTION_MEASUREMENT_RESULT";
private static final String UNIT_FLAG = "unit_flag";
private static final String RESULT = "result";
private static final String TS_FLAG = "ts_flag";
private static final String TS = "ts";
private static final String THERMOMETER_TYPE_FLAG = "thermometer_type_flag";
private static final String THERMOMETER_TYPE = "thermometer_type";
private static final String ACTION_GET_ALL_CONNECTED_DEVICES = "ACTION_GET_ALL_CONNECTED_DEVICES";
public TS28BProfileModule(ReactApplicationContext reactContext) {
super(reactContext);
}
@Override
public String getName() {
return modelName;
}
@Nullable
@Override
public Map<String, Object> getConstants() {
Map<String, Object> constants = new HashMap<>();
constants.put(ACTION_MEASUREMENT_RESULT, TS28BProfile.ACTION_MEASUREMENT_RESULT);
constants.put(UNIT_FLAG, TS28BProfile.UNIT_FLAG);
constants.put(RESULT, TS28BProfile.RESULT);
constants.put(TS_FLAG, TS28BProfile.TS_FLAG);
constants.put(TS, TS28BProfile.TS);
constants.put(THERMOMETER_TYPE_FLAG, TS28BProfile.THERMOMETER_TYPE_FLAG);
constants.put(THERMOMETER_TYPE, TS28BProfile.THERMOMETER_TYPE);
constants.put(ACTION_GET_ALL_CONNECTED_DEVICES, iHealthBaseModule.ACTION_GET_ALL_CONNECTED_DEVICES);
return constants;
}
}
|