Housinnhennkougo #19

Merged
N-YOKU-jp merged 2 commits from housinnhennkougo into main 2024-01-19 05:12:11 +00:00
2 changed files with 4 additions and 4 deletions
Showing only changes of commit 994bdb4b06 - Show all commits

View File

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

View File

@ -5,9 +5,12 @@ import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.app.Service;
import android.bluetooth.BluetoothDevice;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.IntentFilter;
import android.content.pm.PackageManager;
import android.graphics.Color;
import android.os.Build;
@ -15,6 +18,7 @@ import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.util.Log;
import android.widget.Toast;
@ -95,8 +99,6 @@ public class TestService extends Service {
});
}
public void ResetReported() {//FireBaseのisReportedをfalseに初期化するメソッド
//共有プリファレンス全体の準備
SharedPreferences sharedPreferences = getSharedPreferences("app_situation", MODE_PRIVATE);
@ -109,7 +111,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));
}
public void NotificationSetting() {//通知に関する設定の処理を行うメソッド
int importance = NotificationManager.IMPORTANCE_DEFAULT;
//通知チャネルの実装