I had the thought that maybe the UI wasn’t available, so I put the event string in a glo variable to display on the registration screen:create. Additionally I tried sending it to my web api to store in SQL. From what I can surmise, it just never gets fired.
------------------------------------ -- FIREBASE INVITES EVENT ------------------------------------ local function onFirebaseInvites( event ) glo.debugStr = glo.DeepPrintString(event) local url = "http://54.###.##.##/api/Debug?text=" .. glo.DeepPrintString(event) network.request( url, "GET", nil ) end Runtime:addEventListener( "firebaseInvites", onFirebaseInvites )
android= { useGoogleServicesJson = true, intentFilters = { { actions = { "android.intent.action.VIEW" }, categories ={ "android.intent.category.DEFAULT", "android.intent.category.BROWSABLE", }, data = { scheme = "Insert deepLink name here for all this text, the deep link is the thrid field in function" }, }, }, },
and this
local launchArgs = ... if launchArgs and launchArgs.url then print("Data From Launch") print("--------") print(json.encode(launchArgs)) print("--------") end local function urlListener(event) if event.type == "applicationOpen" and event.url then print("Data From Open") print("--------") print(json.encode(event)) print("--------") end end Runtime:addEventListener( "system", urlListener )
Thank you for all of this. I’ve implemented your changes and I’m still unable to get anything back from Google Play. The first event fired is always applicationStart. I’m able to capture the invite ID’s when they are sent out, but they are either not included in the event after install or the applicationOpen event just isn’t firing for some reason.
----------------------------------- -- FIREBASE INVITES ------------------------------------ firebaseInvites = require ( "plugin.firebaseInvites" ) firebaseInvites.init() -- Prints all launch arguments local launchArguments = ... if launchArgs and launchArgs.url then print("Data From Launch") print("--------") print(json.encode(launchArgs)) print("--------") end ------------------------------------ -- SYSTEM EVENTS LISTENER ------------------------------------ local function onSystemEvent( event ) print("\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* EVENT \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* " .. event.type) if event.type == "applicationOpen" then -- and event.url glo.DeepPrint(event) end local url = "http://54.###.###.##/api/UserApplicationStatus/updateStatus?userEmail=" if(event.type == "applicationStart") then network.request(url .. glo.userEmail .. "&isRunning=true", "GET", nil ) end if(event.type == "applicationExit") then network.request(url .. glo.userEmail .. "&isRunning=false", "GET", nil ) end end Runtime:addEventListener( "system", onSystemEvent )
In my actual project, the only time I’ve been able to see the “applicationOpen” event fire is when returning from a Facebook share and the app is in a warm state. It doesn’t fire from a cold state coming from Facebook and it never fires coming from Google Play, regardless of the app state
Even when the event does fire coming from Facebook, it still doesn’t contain any invitation information
Sorry, it is that way in my actual app. I just sent a zip file with [most of] the actual app to support@coronalabs.com
function loadShareScreen(shareWith) if (shareWith == "Contacts") then local message = "Custom message" local title = "Custom Title" local deepLink = "Second Test" local callToActionText = "Click Here to Get It" customImage = "http://54.213.63.96/AppIcon\_600\_600.png" firebaseInvites.show(message, title, deepLink, callToActionText, customImage, function ( ev ) if (ev.isError == true) then -- print("\*\*\*\*\*\*\*\*FIREBASE ERROR\*\*\*\*\*\*\*\*") -- glo.DeepPrint(ev) else -- print("\*\*\*\*\*\*\*\*FIREBASE\*\*\*\*\*\*\*\*") -- glo.DeepPrint(ev) local ids = "" for key, value in pairs(ev.invitationIds) do ids = ids .. "," .. value end RecordInvitations(ids) end end) end if (shareWith == "Facebook") then facebook.login( facebookListener ) end end
That could potentially be an issue. I’ve used the same Firebase app throughout development and now in production. The only thing I’ve changed is the SHA fingerprints. I’m currently using a release keystore both locally and, of course, in my Google Play production release. If you mean the fingerprints, then yes, they came from the release keystore.
Otherwise, how do I determine the keystore being used in Firebase?
It seems to me that the “link” parameter should also be included in the invite link. Unless they are doing something on the backend to fetch and forward to the app?
Then if I go into the Link Preview (Debug) flowchart and click on the “Play Store” links under Have Play Services < 1.1.15 I get this…
I have been reading, looks like you have to use a domain. Let do some research.
The intent filter should catch deep links of your domain, since the Dynamic Link will redirect to your domain if your app is installed. This is required for your app to receive the Dynamic Link data after it is installed from the Play Store.
Thanks. I tried that earlier today, but I used an IP address instead of a domain. I can’t transfer my DNS record yet because it’s not old enough. I’ll try a different domain for the time being.