Fix 1 #16

Merged
r-ca merged 4 commits from fix-1 into main 2024-01-17 11:07:45 +00:00
Showing only changes of commit 51fd91027d - Show all commits

View File

@ -23,6 +23,7 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.graphics.Paint;
import android.net.Uri;
import android.os.Bundle;
import android.os.Vibrator;
@ -165,12 +166,11 @@ public class MainActivity extends AppCompatActivity {
String IdPref = sharedPreferences.getString("ID", null);
if (IdPref == null) {
Log.d("onResume", "ID not initialized.");
return;
}
} else {
mDocRef = FirebaseFirestore.getInstance().document("users/" + IdPref);//現在の位置を取得
this.flg = false;
initNotification(mDocRef);
}
super.onResume();
}
@ -203,13 +203,8 @@ public class MainActivity extends AppCompatActivity {
notifyMain();
}
} else {
if (isInCar) {
E.putBoolean("car", false);
E.putBoolean("car", !isInCar);
E.apply();
} else {
E.putBoolean("car", true);
E.apply();
}
// SupportFragmentManagerが現在表示しているFragmentを取得
Fragment fragment = getSupportFragmentManager().findFragmentById(R.id.fragmentContainerView);
if (fragment instanceof HomeFragment) {