Search code examples
androidlaravelpush-notificationandroid-volleyfirebase-notifications

How to send a notification to a distinct user of Android App


I am working on an android app in which client request for a job. When his job is completed I want to send a notification to submit feedback on Android App. Server Api needs to build in laravel and notifications will be send through Firebase. If you have any idea of helping material please share.

I have tried many youtube tutorials but no success. Most of them use custom php apis but i need in laravel and send notification to a specific user.

Thanks!


Solution

  • First of all you need to grab the InstanceToken from the app in the frontend and submit it to your backend somehow.

    After you have that you can send notifications from the backend using Firebase. Have a look at this great package for some guidance on how that can be done: https://firebase-php.readthedocs.io/en/latest/cloud-messaging.html