case 1001:
return MainFragment.newInstance();
case 1002:
+ case 1003:
return MainA9Fragment.newInstance();
default:
return MainFragment.newInstance();
switch (product){
case 1001:
return AKBatteryResId;
+ case 1003:
case 1002:
return A9BatteryResId;
default:
import android.content.Intent;
import android.content.IntentFilter;
import android.text.TextUtils;
+import android.util.Log;
import androidx.lifecycle.MediatorLiveData;
import androidx.lifecycle.MutableLiveData;
filter.addAction(POWER_OFF_ACTION);
filter.addAction(SOS_ACTION);
filter.addAction(TXT_ACTION);
+ Log.i(TAG,"hrt registerHardwareBroadcast");
int product = BuildConfig.productType;
if (product == 1001) {
filter.addAction(ACTION_KEEPSIT_ALARM);
}
- if (product == 1002) {
+ if (product == 1002 || product == 1003) {
filter.addAction(STRIP_ACTION);
filter.addAction(ACTION_BATTERYLOW);
}
public void onReceive(Context context, Intent intent) {
if (intent != null) {
String acyion = intent.getAction();
+ Log.i(TAG,"hrt acyion "+acyion);
if (TextUtils.isEmpty(acyion)) {
return;
}
break;
case HEART_ACTION:
int heart = intent.getIntExtra("BLOOD_HEART", 0);
+ Log.i(TAG,"hrt BLOOD_HEART "+heart);
mObsHardwareHeart.setValue(String.valueOf(heart));
break;
case STRIP_ACTION:
switch (product){
case 1001:
return akSignalResId;
+ case 1003:
case 1002:
return a9SignalResId;
}
switch (product){
case 1001:
return akPhoneTypeResId;
+ case 1003:
case 1002:
return a9PhoneTypeResId;
}
}
}
- if(product == 1002){
+ if(product == 1002 ||product == 1003){
mObsYear.setValue(currDateTime.format(MMDD));
mObsTime.setValue(currDateTime.format(HH_MM));
mObsWeek.setValue(currDateTime.getDayOfWeek().getDisplayName(TextStyle.SHORT, Locale.getDefault()));
switch (type) {
case 1000:
case 1001:
- if (BuildConfig.productType == 1002) {
+ if (BuildConfig.productType == 1002|| BuildConfig.productType == 1003) {
if (showDialogManage == null) {
showDialogManage = new TextShowDialogManage();
} else {
break;
case 1007:
playKeyboardSound();
- if (BuildConfig.productType == 1002) {
+ if (BuildConfig.productType == 1002 || BuildConfig.productType == 1003) {
if (showDialogManage == null) {
showDialogManage = new TextShowDialogManage();
} else {
private void playKeyboardSound(){
int type = BuildConfig.productType;
- if(type == 1002){
+ if(type == 1002 || type == 1003){
//A9
if(soundPlayUtils == null){
soundPlayUtils= new SoundPlayUtils();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- if (BuildConfig.productType == 1002) {
+ if (BuildConfig.productType == 1002 || BuildConfig.productType == 1003) {
setContentView(R.layout.activity_a9_main);
} else if (BuildConfig.productType == 1001) {
setContentView(R.layout.activity_main);
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view=null;
- if(BuildConfig.productType == 1002){
+ if(BuildConfig.productType == 1002 || BuildConfig.productType == 1003){
view = inflater.inflate(R.layout.fragment_a9_app, container, false);
} else if(BuildConfig.productType == 1001){
view = inflater.inflate(R.layout.fragment_app, container, false);