Search code examples
phpandroidlaravelwear-osandroid-push-notification

Possibilities for sending push-notifications from a PHP webserver to an android smartwatch (without using Firebase/GCM etc.)


I am looking for Options to send push-notifications from laravel-php-web applications to an Android smartwatch. But I do not want to use any cloud service like Google Cloud Messaging or Google Firebase etc, because I don't want to share the sent sensible data with Google or another company.

Do you maybe have any suggestions about how to implement something like this?


Solution

  • If you want to avoid using Google Firebase, you could make use of another service like Pusher or PubNub. You could also make your own Pub/Sub server with Socket.io or the new Laravel-WebSockets library, a library that use the same API as Pusher (for easy integration). This last option is the one I'd recommend. You can check this channel for an in-deep tutorial.

    In order to make Laravel-WebSockets to work with Android, just use the Pusher library for Android and set your host variables and keys in the config.