dabsquared / dabsquared-push-notifications-bundle
Push notifications/messages for mobile devices
Installs: 10 411
Dependents: 0
Suggesters: 0
Security: 0
Stars: 29
Watchers: 8
Forks: 5
Open Issues: 6
Type:symfony-bundle
Requires
- php: >=5.3.3
- ext-zip: *
- doctrine/common: >=2.3
- friendsofsymfony/rest-bundle: *
- jms/serializer-bundle: >= 0.13.0
- knplabs/knp-paginator-bundle: >=2.4
- kriswallsmith/buzz: *
- nelmio/api-doc-bundle: >= 2.11.0
- symfony/framework-bundle: >=2.1
Requires (Dev)
- doctrine/doctrine-bundle: 1.2.*@dev
- doctrine/orm: 2.3.*@stable
- friendsofsymfony/user-bundle: 1.*
- kriswallsmith/assetic: 1.1.*@dev
- symfony/assetic-bundle: 2.1.*@dev
This package is not auto-updated.
Last update: 2020-01-29 05:53:05 UTC
README
A bundle to allow sending of push notifications to mobile devices. Currently supports Android (C2DM, GCM), Blackberry, Safari and iOS devices. The Base framework is imported from https://github.com/richsage/RMSPushNotificationsBundle
Any contributions are welcome. The goal here is to provide an interface for push notifications with device registration and user device pairing just like FOSCommentBundle, but with very little code to write.
Road Map
See Issue #7
Documentation
The bulk of the documentation is stored in the Resources/doc/index.md
file in this bundle:
Installation
All the installation instructions are located in documentation.
License
This bundle is under the MIT license. See the complete license in the bundle:
Resources/meta/LICENSE
Admin Web Interface
Sending Messages
Send to a User:
use DABSquared\PushNotificationsBundle\Message\iOSMessage; class PushDemoController extends Controller { public function pushAction($aUser) { foreach($aUser->getDevices() as $device) { $message = new Message(); $message->setMessage('Oh my! A push notification!'); $message->setDevice($device); $this->container->get('dab_push_notifications')->send($message); } return new Response('Push notification send!'); } }
Send to a Device:
use DABSquared\PushNotificationsBundle\Message\iOSMessage; class PushDemoController extends Controller { public function pushAction($aDevice) { $message = new Message(); $message->setMessage('Oh my! A push notification!'); $message->setDevice($aDevice); $this->container->get('dab_push_notifications')->send($message); return new Response('Push notification send!'); } }