Coder Social home page Coder Social logo

gcm's People

Contributors

az-iar avatar barryvdh avatar dwightwatson avatar freekmurze avatar jaybizzle avatar joelennon avatar lonnyx avatar luisdalmolin avatar mo7amed-3bdalla7 avatar techguard avatar themsaid avatar vrajroham avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gcm's Issues

Send Notification is not optional

$packet->setNotification([
                'title' => $message->title,
                'body' => $message->message,
                'sound' => $message->sound,
            ] + $message->data);

this part of code should be option (just like apn content-available)

Serialization of 'Closure' is not allowed - queue events

Hi,

I got this exception.
I've track this to code where "NotificationFailed" if fired in GcmChannel.php
That code looks like this

            $this->events->fire(
                new NotificationFailed($notifiable, $notification, $this, [
                    'token' => $token,
                    'error' => $result['error'],
                ])
            );

The NotificationFailed Event function looks like this:

    /**
     * Create a new event instance.
     *
     * @param  mixed  $notifiable
     * @param  \Illuminate\Notifications\Notification  $notification
     * @param  string  $channel
     * @param  array  $data
     * @return void
     */
    public function __construct($notifiable, $notification, $channel, $data = [])
    {
        $this->data = $data;
        $this->channel = $channel;
        $this->notifiable = $notifiable;
        $this->notification = $notification;
    }

So, I've track that problem is in $channel parameter. While event function required string to be send, GCMChannel is sending $this object which latter cannot be serialised for queueing.

Gcm Deprecation

As of today google has announced to deprecate gcm and discontinue the service on the 11th of April in 2019, might be best to put up a deprecation notice in the package also?

setApiKey not sending string or empty

For some reason in GCM Service Provider, when setpApiKey function is called, it doesn't transfer string.

I've setup string in env file, and array in broadcasting file.

Also, I've try to dump it in home controller, and it worked fine.
$gcmConfig = config('broadcasting.connections.gcm');
dd($gcmConfig['key']);

But in that function, it doesn't pass as I'm getting this exception.

exception 'ZendService\Google\Exception\InvalidArgumentException' with message 'The api key must be a string and not empty' in /home/vendor/zendframework/zendservice-google-gcm/library/ZendService/Google/Gcm/Client.php:64

Update to zendservice-google-gcm ~2.0

Zend updated their GCM library with support for FCM a few months ago.
The release notes are here: https://github.com/zendframework/ZendService_Google_Gcm/releases/tag/release-2.0.0

FCM adds more features to push notifications, and Google are strongly advising all users on GCM to upgrade to FCM. Details on the differences from GCM to FCM are here: https://developers.google.com/cloud-messaging/faq

Migrating to this newer version and adding support for notification priorities would fix #6

Getting error from GCM

Hi,

Is it possible to get error in GCM directly in notification variable?

Something like $result = $user->notify(new GCMMessage($data));

So I can catch potential errors in $result.

Now it's always null no matter did GCM went through or not.

Laravel 5.4

When can we expect the update for Laravel 5.4?

Code review

Let me know when you're done with the initial code / tests / readme. I'll do a code review and set up packages, and other services

Using GCM to send notification to iOS

Hi,

There is possibility to send push notifications to iOS devices through GCM.

But message that is send to GCM need to have specific structure which I couldn't accomplish with this package.

Is there plan maybe to add this option as well in this package? As it would be cool option to send both iOS and Android notifications through same package.

Kind regards.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.