We were trying to enable screen share feature in a video conference. It need to run a service in the background. So using this package enabled the feature, but when changed the ‘targetSdkVersion’ from 33 to 34, because playstore sent an warning mail to change the targetSdkVersion otherwise app will be removed from the playstore. This change encountered with an issue. Error is given below,
No issues at all in iOS platform.
NB: Need to fix the exceptions faced before august 10th. Because that’s what last date set by the google play console.
sample code is
//service initiate
FlutterForegroundTask.init(
androidNotificationOptions: AndroidNotificationOptions(
channelId: 'notification_channel_id',
channelName: 'Foreground Notification',
channelDescription:
'This notification appears when the foreground service is running.',
channelImportance: NotificationChannelImportance.HIGH,
priority: NotificationPriority.HIGH,
iconData: const NotificationIconData(
resType: ResourceType.mipmap,
resPrefix: ResourcePrefix.ic,
name: 'launcher',
),
),
iosNotificationOptions: const IOSNotificationOptions(
showNotification: true,
playSound: false,
),
foregroundTaskOptions: const ForegroundTaskOptions(
interval: 5000,
isOnceEvent: false,
autoRunOnBoot: true,
allowWakeLock: true,
allowWifiLock: true,
),
);
//starting service
await FlutterForegroundTask.startService(
notificationText: "Screensharing active",
notificationTitle: "Screensharing");
Inquisitive Owl is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.