Hello,
I having been testing an app that has Google Cloud Messaging config and build settings. In other words, in the config.lua , it has the required:
notification ={ google = { projectNumber = "[my-project-number]" }, },
and in the build.settings it has the required:
android = { permissions = { { name = ".permission.C2D\_MESSAGE", protectionLevel = "signature" }, }, usesPermissions = { "android.permission.INTERNET", "android.permission.GET\_ACCOUNTS", "android.permission.RECEIVE\_BOOT\_COMPLETED", "com.google.android.c2dm.permission.RECEIVE", ".permission.C2D\_MESSAGE", }, },
So the app is published with such setting. But when I try to remove the GCM-related settings , a weird situation has been occurring. I’ll comment out the code as follows:
-- notification ={ -- google = { projectNumber = "[my-project-number]" }, -- },
and
-- { name = ".permission.C2D\_MESSAGE", protectionLevel = "signature" }, -- "android.permission.GET\_ACCOUNTS", -- "android.permission.RECEIVE\_BOOT\_COMPLETED", -- "com.google.android.c2dm.permission.RECEIVE", -- ".permission.C2D\_MESSAGE",
Afterwards, I’ll publish the new version of the app on the Play Store. For my Android device (Samsung Tab 3) that already had the app installed, when I update the app from the Play Store, the app doesn’t start on the device anymore. So I need to add back all that GCM-related settings to the project, including all those ugly permissions. Then I’ll update the app again and it will work once again.
I think I’ve narrowed it down to happening mainly when the following comments are made:
-- notification ={ -- google = { projectNumber = "[my-project-number]" }, -- }, -- "com.google.android.c2dm.permission.RECEIVE",
I am curious as to if anybody knows why this would be happening.
(My reason for this test is because I am trying to remove GCM setting from one of my apps, which has previously stopped using GCM. I’d like to be able to remove the related permissions and settings, too.)
Thank you.