Skip to content

android_alarm_manager: Getting alarm ID in callback #31658

@ognjenio

Description

@ognjenio

Hi,

Is there any way to get the alarm ID in the callback? In fact is there any way to get any information in the Isolate -- perhaps the entire Intent?

Judging by https://github.com/flutter/plugins/blob/master/packages/android_alarm_manager/android/src/main/java/io/flutter/plugins/androidalarmmanager/AlarmService.java#L171 it isn't.

What would then be the recommended way of passing an argument of some kind -- if it's possible at all.

I've considered saving the alarm trigger DateTime and arguments then once it does trigger querying for the alarm that's due.

I also tried using noSuchMethod but then the argument for scheduling the alarm isn't acceptable since the method doesn't exist. Perhaps the argument could can be changed to a string?

Metadata

Metadata

Assignees

No one assigned

    Labels

    p: android_alarm_managerThe Android background execution pluginpackageflutter/packages repository. See also p: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions