Why is the limited_package_name property used?

According to the documentation , restricted_package_name

means:

This parameter specifies a string containing the package name of your application. When installed, messages are sent only to registration IDs that match the package name. Optional.

But are the registration IDs the same regardless of whether this field is specified? What could be a precedent for restricted_package_name

?

+3


source to share


1 answer


No, messages are not limited packageId

to the default app , which means that an app with any package can receive your messages as long as it knows yours GCM Sender ID

and as long as you use it GCM registration Id

as the recipient id of the message.This isn't usually a problem - most likely you are doing additional checks in its middle tier, which handles the registration of app sender IDs, but if you think you want more control or want to do selective submission, you can use restricted_package_name

to narrow down the recipients of your message.



+5


source







All Articles