Merge branch 'main' into housinnhennkougo

This commit is contained in:
ろむねこ 2024-01-19 12:20:14 +09:00 committed by GitHub
commit d65ff52a00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -318,7 +318,6 @@ public class MainActivity extends AppCompatActivity {
super.onStop(); super.onStop();
Intent intent = new Intent(getApplication(), TestService.class); Intent intent = new Intent(getApplication(), TestService.class);
startService(intent);//TestServiceを起動 startService(intent);//TestServiceを起動
} }
} }

View File

@ -5,9 +5,12 @@ import android.app.NotificationChannel;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.app.PendingIntent; import android.app.PendingIntent;
import android.app.Service; import android.app.Service;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.IntentFilter;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.graphics.Color; import android.graphics.Color;
import android.os.Build; import android.os.Build;
@ -15,6 +18,7 @@ import android.os.Handler;
import android.os.IBinder; import android.os.IBinder;
import android.os.Looper; import android.os.Looper;
import android.os.Vibrator; import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.util.Log; import android.util.Log;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
@ -90,8 +94,6 @@ public class TestService extends Service {
}); });
} }
public void ResetReported() {//FireBaseのisReportedをfalseに初期化するメソッド public void ResetReported() {//FireBaseのisReportedをfalseに初期化するメソッド
//共有プリファレンス全体の準備 //共有プリファレンス全体の準備
SharedPreferences sharedPreferences = getSharedPreferences("app_situation", MODE_PRIVATE); SharedPreferences sharedPreferences = getSharedPreferences("app_situation", MODE_PRIVATE);
@ -104,7 +106,6 @@ public class TestService extends Service {
isReported.update("isReported", false).addOnSuccessListener(unused -> Log.d(TAG, "DocumentSnapshot successfully updated!")).addOnFailureListener(e -> Log.w(TAG, "Error updating document", e)); isReported.update("isReported", false).addOnSuccessListener(unused -> Log.d(TAG, "DocumentSnapshot successfully updated!")).addOnFailureListener(e -> Log.w(TAG, "Error updating document", e));
} }
public void NotificationSetting() {//通知に関する設定の処理を行うメソッド public void NotificationSetting() {//通知に関する設定の処理を行うメソッド
int importance = NotificationManager.IMPORTANCE_DEFAULT; int importance = NotificationManager.IMPORTANCE_DEFAULT;
//通知チャネルの実装 //通知チャネルの実装