Package selection guidance compiled from public package information, community data, and project usage.
A Flutter plugin for handling VoIP push notifications, currently supporting iOS 8.0 and above. It enables real-time communication apps to receive push notifications even when the app is terminated, ensuring reliable call connectivity. The package integrates with Apple's Push Notification service (APNs) to deliver silent VoIP notifications, allowing background app activation for incoming calls. Designed specifically for voice-over-IP applications like VoIP calling or messaging platforms requiring immediate notification delivery. Works seamlessly within Flutter’s ecosystem with minimal setup. No support for Android at this time.
Use cases
Real-time VoIP calling apps
Background call notifications
Silent push notification handling
App wake-up on incoming calls
Voice communication platforms
Key features
iOS-only VoIP push support
Silent notification delivery
Background app activation
Apple APNs integration
Minimal configuration required
Suitable for
VoIP application developers
Real-time communication apps
iOS-focused Flutter projects
Call routing systems
Apps needing reliable background notifications
Considerations
No Android support
Requires iOS 8.0+
Needs APNs certificate setup
Limited to VoIP use cases
Dependent on Apple's push infrastructure
Original README
Original README snapshot from the linked source repository. Visit the repository for the latest content.
Flutter VoIP Push Notification
Flutter VoIP Push Notification - Currently iOS >= 8.0 only
Motivation
Since iOS 8.0 there is an execellent feature called VoIP Push Notification (PushKit), while firebase_messaging does not support voip push notification which is only available on iOS >= 8.0 which is the reason for this plugin.
To understand the benefits of Voip Push Notification, please see VoIP Best Practices.
import'package:flutter/material.dart';
import'package:flutter/material.dart';
import'dart:async';
import'package:flutter_voip_push_notification/flutter_voip_push_notification.dart';
voidmain() => runApp(MyApp());
classMyAppextendsStatefulWidget{
@override_MyAppStatecreateState() => _MyAppState();
}
class_MyAppStateextendsState<MyApp> {
String _pushToken = '';
FlutterVoipPushNotification _voipPush = FlutterVoipPushNotification();
@overridevoidinitState() {
super.initState();
configure();
}
// Configures a voip push notificationFuture<void> configure() async {
// request permission (required)await _voipPush.requestNotificationPermissions();
// listen to voip device token changes
_voipPush.onTokenRefresh.listen(onToken);
// do configure voip push
_voipPush.configure(onMessage: onMessage, onResume: onResume);
}
/// Called when the device token changesvoidonToken(String token) {
// send token to your apn provider serversetState(() {
_pushToken = token;
});
}
/// Called to receive notification when app is in foreground////// [isLocal] is true if its a local notification or false otherwise (remote notification)/// [payload] the notification payload to be processed. use this to present a local notificationFuture<dynamic> onMessage(bool isLocal, Map<String, dynamic> payload) {
// handle foreground notificationprint("received on foreground payload: $payload, isLocal=$isLocal");
returnnull;
}
/// Called to receive notification when app is resuming from background////// [isLocal] is true if its a local notification or false otherwise (remote notification)/// [payload] the notification payload to be processed. use this to present a local notificationFuture<dynamic> onResume(bool isLocal, Map<String, dynamic> payload) {
// handle background notificationprint("received on background payload: $payload, isLocal=$isLocal");
showLocalNotification(payload);
returnnull;
}
showLocalNotification(Map<String, dynamic> notification) {
String alert = notification["aps"]["alert"];
_voipPush.presentLocalNotification(LocalNotification(
alertBody: "Hello $alert",
));
}
@overrideWidgetbuild(BuildContext context) {
returnMaterialApp(
home: Scaffold(
appBar: AppBar(
title: constText('Plugin example app'),
),
body: Center(
child: Text('Received Voip Push token: $_pushToken\n'),
),
),
);
}
}