showLiveActivityTemplate method
Render a Nexus Live Activity template on Android: a promoted Live Update
(ProgressStyle — segments/points/tracker icon, status chip, ETA countdown)
on Android 16+, an ongoing notification with a progress bar otherwise.
payload is { event, activityId, template, data }. Returns true if shown.
Implementation
@override
Future<bool> showLiveActivityTemplate({required int id, required Map<String, dynamic> payload}) async {
try {
final ok = await methodChannel.invokeMethod<bool>('showLiveActivityTemplate', {'id': id, 'payload': jsonEncode(payload)});
return ok ?? false;
} catch (_) {
return false;
}
}