Hello,
I understand that notifyListeners is only available in the Plugin Class eg
@CapacitorPlugin(name = “CapacitorTimerNotification”)
class CapacitorTimerNotification : Plugin() {
fun showTimerNotification(call: PluginCall) {
notifyListeners(“onPauseTimer”, JSObject())
}
}
How can I use notifyListeners from a BroadcastReceiver Class? eg
class TimerNotificationReceiver : BroadcastReceiver() {
override fun onReceive(context: Context, intent: Intent) {
val action: String? = intent.action
if (action == “pause”) {
notifyListeners(“onPauseTimer”, JSObject())
}
}
Thanks!