Google Push Notification Problem

Hi,

I use Corona Enterprise. In my project, I want to use Google Push Notification. When I add the following code to config.lua, build the project, and then run the app in device, the app crash. 

the code I add:

notification =

    {

        iphone =

        {

            types =

            {

                “badge”, “sound”, “alert”, “newsstand”

            }

        },

        

        google =

        {

          projectNumber = “550865376816”,

        },

    }

The app can run without problem, if I remove the code. Is there anything I’ve missed? Is there any tutorial to show how to use Google Push in CoronaEnterprise?

Is there any suggestion?

Hi @datasoftware,

Are you familiar with using plugins within Enterprise, or is this the first time you’re attempting to include one?

Best regards,

Brent

Is there any suggestion?

Hi @datasoftware,

Are you familiar with using plugins within Enterprise, or is this the first time you’re attempting to include one?

Best regards,

Brent

Maybe you can download latest Corona Enterprise.

Did you include the Android permission needed for push notifications to your “AndroidManifest.xml” file?  Because this crash is mostly likely caused by a SecurityException.  You can confirm by looking at the log output from your device via “adb logcat”.  Google’s SecurityException will indicate what permission is missing.

Note that the Corona “build.settings” file is not used when doing native Android builds.  That file is only used by the Corona Simulator.  So, whatever Android permissions you are using in that file you need to hand copy into the “AndroidManifest.xml” file according to Google’s documentation.  Have a look at our documentation here…

   https://docs.coronalabs.com/guide/events/appNotification/index.html#android-setup-push

You’ll need those Android permission in your AndroidManifest.xml file.  Also, Android does not support permissions starting with a “.” as shown in that documentation.  That’s a Corona thing intended to make setup easier for Corona developers.  You need to prefix the permissions starting with a “.” with your app’s package name.

Also, have a look at our documentation below for how to set up your own notification icon when doing native Android development.

   https://docs.coronalabs.com/guide/events/appNotification/index.html#enterprise

Maybe you can download latest Corona Enterprise.

Did you include the Android permission needed for push notifications to your “AndroidManifest.xml” file?  Because this crash is mostly likely caused by a SecurityException.  You can confirm by looking at the log output from your device via “adb logcat”.  Google’s SecurityException will indicate what permission is missing.

Note that the Corona “build.settings” file is not used when doing native Android builds.  That file is only used by the Corona Simulator.  So, whatever Android permissions you are using in that file you need to hand copy into the “AndroidManifest.xml” file according to Google’s documentation.  Have a look at our documentation here…

   https://docs.coronalabs.com/guide/events/appNotification/index.html#android-setup-push

You’ll need those Android permission in your AndroidManifest.xml file.  Also, Android does not support permissions starting with a “.” as shown in that documentation.  That’s a Corona thing intended to make setup easier for Corona developers.  You need to prefix the permissions starting with a “.” with your app’s package name.

Also, have a look at our documentation below for how to set up your own notification icon when doing native Android development.

   https://docs.coronalabs.com/guide/events/appNotification/index.html#enterprise