Can i use one GCM project number in two different

2019-08-10 01:35发布

We have two different application but both required same push notification from Google Cloud Messages and i have use only one sender id (Project No of Enable one of Google Console )in both app .

Do this will create any issue because i am getting two push for same message in my one of the application.

1条回答
何必那么认真
2楼-- · 2019-08-10 01:49

Simply restrict your notification by package name:

Sender sender = new Sender(KEY);
GCMessage msg = new GCMessage.Builder().
restrictedPackageName(GC_PACKAGE_NAME).build();
查看更多
登录 后发表回答