Facebook native login SOLVED => Push notifications BROKEN


#1

Hi,

I finally fixed an old issue that wouldn’t allow me to build my app after downloading the native facebook plugin (phonegap).
( Problem of “multiple dex” => different use of android support library v4 / v13)

For info, I fixed it by adding the rule

configurations {
all*.exclude group: ‘com.android.support’, module: ‘support-v4’
}
in my build.gradle (in repertory platform/android)

HOWEVER, now that I fixed this native login, sending notification works, but receiving them breaks my app.

I am using OneSignal to send / receive push notifications. (and not ionic push; although there might be some left over of this plugin in spite of it being removed from cordova plugin list)

Is Onesignal using that android support v4?
Did anyone face this problem as well?

Thanks for your help and advises.


#2

Hello,

The crash is happening as you have excluded the android support library v4 from the build which is required to process an incoming OneSignal notification.

If you’re using 'com.phonegap.plugins.facebookconnect' in your project I recommend removing it and add 'cordova-plugin-facebook4' instead. I also recommend you follow our Clean Build instructions to make sure you don’t have any parts left from other removed plugins.

Let us know if you’re still seeing an issue after this.

Thanks.


#3

Hi,

Thanks for your help. That answers my question, android support library v4 is indeed needed.

I tried already facebook4, without success unfortunately. I guess I will have to get back to it…

Thanks again.

EDIT: actually, for reasons I don’t understand it is now working like a charm with facebook4.
OneSignal notifications are back, thanks a lot!