Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Notification v2 plugin issue on Android while App is not in Memory
Started by BK PANARA Aug 22 2018 10:53 PM

4 replies to this topic
android notification v2 app not in memory
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

BK PANARA

[GLOBAL: userInfoPane.html]
BK PANARA
  • Enthusiast

  • 43 posts
  • Corona SDK

Hello Guys,

Notification v2 plugin issue on Android while App is not in Memory
 

I am using Corona SKD build : 2018:3353
I am going to implement Corona Plugin notification v2 in my App.( with FCM) 
I just tested Corona Plugin v2 on my Android 5.0 and Android 8.1 devices
When i send test notification from firebase cloud messaging portal
Android 8.1 device got notification on All states
BUT My Android 5.0 device NOT getting notification if App is not in memory.
(for Android 5.0 , getting notification if App is Active or running in background)


main.lua :
local notifications = require('plugin.notifications.v2')

local function notificationListener( event )
	print('notificationListener : Event:' , event.type)
	if event.type=="remoteRegistration" then
		local ts=notifications.getDeviceToken()
		print("notificationListener : device Token : ",ts)
	end
end
Runtime:addEventListener('notification', notificationListener)

timer.performWithDelay( 4000, function()
	local ts=notifications.getDeviceToken()
        if (ts == nil) or (ts == "unknown") then 
	    notifications.registerForPushNotifications({useFCM=true})
	    timer.performWithDelay(2000,function()
				  	ts=notifications.getDeviceToken()
				  	doAnalytics()
				end)
	end
end)

build.settings :

settings = 
{
    orientation =
    {
	default = "portrait",
	supported = { "portrait" }
    },
    plugins =
    {
        ["plugin.notifications.v2"] =
        {
            publisherId = "com.coronalabs"
        },
    },
    android =
    {
        useGoogleServicesJson = true,
    },
}

How soon can CoronaLabs fix this so I can release my new app ?

Thank you.
Bhavin

 

 



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

Can you put together a sample project that demonstrates the error complete with build.settings and config.lua and put that in a .zip file to share with us?

 

Rob



[TOPIC: post.html]
#3

BK PANARA

[GLOBAL: userInfoPane.html]
BK PANARA
  • Enthusiast

  • 43 posts
  • Corona SDK

Hi Rob,

Thank for your attention.

Here a sample project zip file :
https://www.dropbox.com/s/1n9aqzt5w11pd0g/Notification%20v2%20FCM.zip?dl=0

You guys need to update 2 files required by Firebase (i can not share my account files):
1. google-services.json
2. GoogleService-Info.plist

I think issue with Notification is only < Android 8.0 device and only when App is not in Memory. if App is Active on Screen or in background then getting Notification.

Thank you.
Bhavin



[TOPIC: post.html]
#4

BK PANARA

[GLOBAL: userInfoPane.html]
BK PANARA
  • Enthusiast

  • 43 posts
  • Corona SDK

Hi @Rob,

Any news on this issue ??

Thank you.
Bhavin 



[TOPIC: post.html]
#5

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,535 posts
  • Corona Staff

I've asked Engineering to look into this.

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: android, notification v2, app not in memory