Я пытаюсь передать переменную (long) из действия в службу, у меня есть следующее
В деятельности:
myIntent = new Intent(SetAlarm.this, Service.class);
pendingIntent = PendingIntent.getService(
SetAlarm.this,
(int)reminderId,
myIntent,
0
);
AlarmManager alarmManager = (AlarmManager)getSystemService(ALARM_SERVICE);
bundle = new Bundle();
bundle.putLong("reminderId", reminderId);
myIntent.putExtras(bundle);
alarmManager.set(AlarmManager.RTC_WAKEUP, timeInMillisec, pendingIntent);
В моем сервисе:
Bundle bundle = intent.getBundleExtra("bundle");
CurrentreminderId = (long)bundle.getLong("reminderId");
Каким-то образом, я просто не мог взять это значение памятки, какие-нибудь идеи? Любая помощь будет принята с благодарностью, спасибо кучу.