버그
-
[안드로이드]AlarmManager cancel() 안먹힐 때 보세요~Development/Android 2018. 6. 5. 17:41
늘 그렇듯 우리는 알람을 설정할 때에는 이런식으로 합니다. 클래스에서 알람을 생성한뒤 리시버로 전달->서비스에서 실행하죠. 그러나 알람은 여러개를 만들고 상황에 따라 다르게 설정할 경우가 있죠. 그래서 인텐트에 별도로 Action을 설정해주는 경우가 많이 있습니다. AlarmManager alarmManager = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);Intent intent = new Intent(context, AlarmReceiver.class);intent.setAction(액션1); //액션PendingIntent pIntent = PendingIntent.getBroadcast(context, requestCode, in..