facebook publishInstall is NOT working on Android

Here is my AndroidManfifest.xml.  There was no strings.xml in my apk.  

FYI, Facebook is now showing I only have around 35% of the daily actives that I did since I published with 3012.  I just checked and I have roughly 35% of my user base on Android 6 - Is this coincidental or does it narrow down what the issue could be?

\<?xml version="1.0" encoding="utf-8"?\> \<manifest xmlns:android=http://schemas.android.com/apk/res/android versionCode="1390" versionName="1.39" installLocation="0" package="com.spheregamestudios.designercity" platformBuildVersionCode="23" platformBuildVersionName="6.0-2438415"\> \<uses-sdk minSdkVersion="15" targetSdkVersion="23"/\> \<uses-permission name="com.android.vending.BILLING"/\> \<uses-permission name="android.permission.INTERNET"/\> \<uses-permission name="android.permission.WRITE\_EXTERNAL\_STORAGE"/\> \<uses-permission name="android.permission.ACCESS\_NETWORK\_STATE"/\> \<uses-feature glEsVersion="131072"/\> \<uses-feature name="android.hardware.telephony" required="0"/\>\<uses-feature name="android.hardware.screen.portrait" required="0"/\>\<uses-feature name="android.hardware.screen.landscape" required="-1"/\> \<application label="DesignerCity" icon="2130903040" name="android.support.multidex.MultiDexApplication" hardwareAccelerated="-1" largeHeap="-1" banner="2130837580"\> \<meta-data name="targetedAppStore" value="google"/\> \<meta-data name="com.facebook.sdk.ApplicationId" value="508028766008532"/\> \<activity theme="16973831" label="DesignerCity" name="com.ansca.corona.CoronaActivity" launchMode="2" screenOrientation="6" configChanges="1264"\> \<meta-data name="requestedDefaultOrientation" value="sensorLandscape"/\>\<intent-filter\> \<action name="android.intent.action.MAIN"/\>\<category name="android.intent.category.LAUNCHER"/\>\</intent-filter\> \</activity\> \<activity theme="16973831" name="com.ansca.corona.CameraActivity" screenOrientation="1" configChanges="1184"/\> \<activity theme="16973831" name="com.ansca.corona.VideoActivity" configChanges="1264"/\> \<activity theme="16973831" name="com.ansca.corona.purchasing.StoreActivity" configChanges="1184"/\> \<provider name="com.ansca.corona.storage.FileContentProvider" exported="-1" authorities="com.spheregamestudios.designercity.files"/\> \<service name="com.ansca.corona.CoronaService"/\> \<receiver name="com.ansca.corona.SystemStartupBroadcastReceiver"\> \<intent-filter\> \<action name="android.intent.action.BOOT\_COMPLETED"/\> \</intent-filter\> \</receiver\> \<receiver name="com.ansca.corona.notifications.AlarmManagerBroadcastReceiver"/\> \<receiver name="com.ansca.corona.notifications.StatusBarBroadcastReceiver"/\> \<receiver name="com.ansca.corona.notifications.GoogleCloudMessagingBroadcastReceiver" permission="com.google.android.c2dm.permission.SEND"\> \<intent-filter\> \<action name="com.google.android.c2dm.intent.RECEIVE"/\> \<action name="com.google.android.c2dm.intent.REGISTRATION"/\> \<category name="com.spheregamestudios.designercity"/\> \</intent-filter\> \</receiver\> \<service name="com.vungle.publisher.VungleService" exported="0"/\> \<activity theme="16973840" name="com.facebook.FacebookActivity" configChanges="1456"/\> \<activity theme="16973831" name="plugin.facebook.v4.FacebookFragmentActivity" configChanges="1184"/\> \<activity theme="16973831" name="com.vungle.publisher.VideoFullScreenAdActivity" configChanges="1073745919"/\> \<activity theme="16973841" name="com.vungle.publisher.MraidFullScreenAdActivity" configChanges="1184"/\> \</application\> \</manifest\>

Looking at the release notes, there are a couple of things that might be impacting this.

  1. In Build 3005, we turned on our Android Plugin dependency system so that plugins would place nice with each other. While I doubt this has any impact, it is a change.  

  2. In Build 3009, we changed our minimum Android SDK to 4.0.1. 

So you could either try dropping back to build 3007 and see if that helps or drop back before 3005 and rule out those changes. 

I’ll bring this up with Engineering. They are likely going to want a bug report including a test case that can reproduce the problem.

Rob

Question: You say you’re seeing different stats using Google Analytics. I don’t see that plugin in your build.settings. How are you collecting these GA stats?

Rob

I’ll be pushing an update early next week so I’ll wait and see what engineering say before using an older build to publish with.   It does seem to be only Android 6 installs (from my figures) that are being recorded on Facebook.  My minSdkVersion=“15” so it probably isn’t the build 3009 changes.  Most likely the plugin dependency changes.

Thanks for looking into this for me.

Edit: Regarding GA, I use this https://code.coronalabs.com/code/google-analytics-module.  I also have a MySQL back-end server that tracks game activity,  The figures from my DB roughly match GA figures.

Can you also explain to me (and the engineers) how you’re using .publishInstall(). It just reports to Facebook the first time someone installs an app. Normally it would be used in advertising situations but I don’t see any ad plugins in your build.settings.  I guess it might be important for getting friends lists who have the app installed. But how are your and your app using this data? Is it just an analytics point? Are you using attribution to purchase advertising to increase your user base?

Rob

I did use FB ads until Aug 16.  I am looking to do further campaigns this year so I will need to be able to attribute an install to an ad to get accurate CPI’s. 

I allow users to sync their game across multiple devices and I use FB for that and users can also visit their FB friend’s that are playing the game.

It is also very useful for demographics and user profiling.

Hi Chinta,

We now provide a versioning/upgrade guide with details on what’s changed between different versions of the Facebook plugin. There were some changes made to the implementation of publishInstall() under the hood in that time frame you mentioned. You might consider experimenting with the different versions of the Facebook plugin to help isolate down what sounds like a regression.

Thanks for the reply Ajay. 

Could you give me more details on how to change the versions of the Facebook plugin ? I am using facebook.v4 plugin. Are there any other or recent facebook plugins than v4?

The version of the Facebook v4 plugin that will be built into your app depends on what daily build of Corona you are using. For example, if you wanted to use the “3/2016 update” version of the plugin, you would need to use any daily build between 2015.2828 and 2016.2931 of Corona. You can grab these daily builds from our page here.

Also, Facebook-v4 is the most recent Facebook plugin we have. Should Facebook decide to rewrite their SDKs again, then you may see a Facebook-v5 plugin in the future.

Thanks for the reply Ajay. I have tried the build 2929, but still the install did not show up in the Facebook dashboard.

This is very important to our release as we have planned Facebook app install ads as part of our marketing campaign.

So any help with this is highly appreciated !

I just built an app and do not have this issue. I see my test app install from yesterday. I have the KeyHash filled in. I also have this in the class name:

com.ansca.corona.CoronaActivity

Using corona: 3011

And this is my plug-in build settings:

plugins = { ["plugin.appodeal"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true, appletvos=true } }, ["plugin.facebook.v4"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true, ["android-kindle"]=true } }, ["plugin.bit"] = { publisherId = "com.coronalabs", }, ["plugin.openssl"] = { publisherId = "com.coronalabs", }, },

Thanks @agramonte. I will try the build 3011.

I can agree with this…  since publishing (Jan 10th) with 3012 I’ve seen a noticeable drop off in FB reporting - like 50+%.

Apparently my daily actives have gone from 20k to 9k but Google analytics strongly disagrees and shows my current daily actives at 25k.

There is clearly something wrong in publishInstall().  Most of my traffic is Android.

  

Can you narrow down what build seems to be responsible for the change in behavior?

Rob

Hey Rob,

I can tell you I was building with 2911 for ages and finally moved to 3012.  The drop off with 3012 is very noticeable - see image below.  If that helps at all.  Maybe you can cross reference those builds with the Facebook v4 plugin builds?

Unfortunately, I would really piss off my players but pushing lots of releases out to find the Corona build that doesn’t exhibit this behaviour.  I can see that only Android is affected as iOS shows the growth continuing.

This is Android

2afa688.jpg

and this is iOS

34i21hs.png

Adrian

The last update to the Facebook plugin was on 12/7/2016. That chance was to the two .lua files that download to the Mac and Win simulators that say you can’t use them in the simulator. This update is in the time frame of daily builds 2999/3001 (but are not dependent on those). Before that the last thing that actually touched the plugin was 11/16/2016 which is in the 2992 (public build) range in time.

Build 2911 was from July 12, 2016 so we’ve had many changes since then. Can you install a release version and see if there is anything useful in the device’s console log?

Rob

Nothing eventful in logs on multiple devices.  Is there anything I can check to see if publishInstall() encountered an error?

All I do is call this in main.lua

local facebook = require ( "plugin.facebook.v4" ) facebook.publishInstall()

Your best bet might be to file a bug report.

Rob

I just did but I haven’t received an email or a case number?

In that case can you email it to support@coronalabs.com.