Search code examples
androidfacebookpush-notificationandroid-push-notificationfacebook-analytics-push

Does Facebook SDK 3.23.1 include the FBNotifications library?


I am following the Push Campaigns Quickstart at https://developers.facebook.com/docs/push-notifications/quickstart. At the beginning of the document, I found this paragraph:

Prior to sending in-app notifications you will also need to integrate the FBNotifications library.

Based on the documentation at https://github.com/facebook/FBNotifications, I need to add the following to my gradle dependencies:

compile 'com.facebook.android:notifications:1.+'

I already have this in my gradle dependencies:

compile 'com.facebook.android:facebook-android-sdk:3.23.1'

Does Facebook SDK 3.23.1 (com.facebook.android:facebook-android-sdk:3.23.1) include the FBNotifications library (com.facebook.android:notifications:1.+)? Thank you.

EDIT: In the question at Android In-App Notifications Integration Popup not showing, the asker is using both 'com.facebook.android:facebook-android-sdk:4.+' and 'com.facebook.android:notifications:1.+'. That makes me think that Facebook SDK does not include the FBNotifications library.


Solution

  • I was examining the code at https://github.com/facebook/FBNotifications/blob/master/Android/notifications-example/build.gradle and I found this block of code:

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:appcompat-v7:23.1.1'
        compile 'com.android.support:design:23.1.1'
        compile 'com.google.android.gms:play-services:8.4.0'
        compile 'com.facebook.android:facebook-android-sdk:4.+'
        compile 'commons-io:commons-io:2.4'
        compile project(':notifications')
        apply plugin: 'com.google.gms.google-services'
    }
    

    I see how the code includes both 'com.facebook.android:facebook-android-sdk:4.+' and project(':notifications'). Conclusion: Facebook SDK does not include FBNotifications.