Does Facebook SDK 3.23.1 include the FBNotifications library? - android

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.

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.

Related

(Failed to resolve , two libararies with same package name) Conflict between gms library and firebase-messaging

Here I want to use two libraries in my gradle files which are not from same package but it doesnt allow me to use it, how can I solve it?
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:recyclerview-v7:22.2.+'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'com.android.support:design:22.2.1'
compile files('libs/fortumo-in-app-android-sdk.jar')
compile 'com.google.firebase:firebase-messaging:9.4.0'
Android force you to use the same google version of dependencies if you are using more then one google dependencies.
So i'll suggest you to use the latest dependencies.
compile 'com.google.android.gms:play-services-ads:7.5.0'
Replace above dependency with the below one and you are good to go.
com.google.android.gms:play-services-ads:9.4.0
Problem
Conflicting between two same type com.google library .
compile 'com.google.android.gms:play-services-ads:7.5.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
Call firebase-messaging:9.4.0 instead of play-services-ads:7.5.0
Then Clean-Rebuild-Gradle .Before starting work please read Add Firebase to Your Android Project
I guess you're getting an error, something like this:
All com.google.android.gms libraries must use the exact same version
specification (mixing versions can lead to runtime crashes)
Which is quite self-explanatory.
Change the following:
compile 'com.google.android.gms:play-services-ads:7.5.0'
To this:
compile 'com.google.android.gms:play-services-ads:9.4.0'

Android Firebase Analytics not Working

I followed the instructions at Firebase Analytics quick start, but even after 24 hours, no user session was registered at Firebase Console.
I know that my google-services.json is correct because Firebase Auth is working properly (both Google and Facebook users are visible on the dashboard).
My Gradle dependencies are:
dependencies {
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.14.1'
compile 'com.google.android.gms:play-services-auth:9.2.1'
compile 'com.google.android.gms:play-services-maps:9.2.1'
compile 'com.google.code.gson:gson:2.1'
compile 'com.google.firebase:firebase-auth:9.2.1'
compile 'com.google.firebase:firebase-core:9.2.1'
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
}
At August, 1st 2016, Google Developers upgraded Firebase quickstart examples on GitHub
Firebase version was upgraded from 9.2.1 to 9.4.0, which seems to have fixed my Analytics update issues.
I was facing same problem what i missed in my project gradle file add this dependency
classpath 'com.google.gms:google-services:3.0.0'
and in my android gradle or you can say app gradle i add this
in last line
apply plugin: 'com.google.gms.google-services'

admob to deprecate sdk to replace with Ads SDK 7.0.0 - how to upgrade just admob jar in google play services

Let me show you my current build dependencies so you understand my frustation:
dependencies {
compile 'com.google.android.gms:play-services-ads:8.3.+'
compile 'com.google.android.gms:play-services-wearable:8.3.+'
compile 'com.google.android.gms:play-services-plus:8.3.+'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.onesignal:OneSignal:2.+#aar'
compile 'com.google.android.gms:play-services-analytics:8.3.+'
compile "com.google.android.gms:play-services-location:8.3.+"
compile 'com.google.android.gms:play-services-gcm:8.3.+'
compile 'com.android.support:design:22.2.+'
//for now disable wearApp dependency for PaidRelease builds
wearApp project(':wearable')
compile 'com.squareup:otto:1.3.5'
compile fileTree(dir: 'libs', include: ['*.jar'])
//compile 'com.android.support:support-v4:22.0.+'
compile 'com.android.support:appcompat-v7:23.0.+'
}
and here are my wearable dependencies:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.google.android.support:wearable:1.2.0'
compile 'com.google.android.gms:play-services-wearable:7.5.0'
}
Notice in my apps dependencies i am using 8.3.+ for the version meaning only update minor version changes. Admob wrote me the following a few days ago:
In order to ensure that your ads continue to serve after September 15th, 2016, please upgrade to Google Mobile Ads SDK 7.0.0 or higher.
They said one way to do this is to just update the entire google play services to 9.0.2. But I am not using entire Play Service dependencies. As you can see I just get the exact packages I need to save space and method count.
The issue:
If I were to replace the following line:
compile 'com.google.android.gms:play-services-ads:8.3.+'
with
compile 'com.google.android.gms:play-services-ads:9.0.2'
I am not confident it will work with the 8.3.+ jars I depend on. Wont I have to update the entire google play services jars I am using to be 9.0.+ also?
You're already using version 8.3 as denoted by play-services-ads:8.3.+, well above the 7.0.0 cutoff, so there's no action needed on your part.

Failed to resolve firebase-ui:0.4.0

Trying to update my firebaseui. But Why doesn't this work in my gradle file?
compile 'com.firebaseui:firebase-ui:0.4.0'
UPDATE
Still same problem.
My other dependicies ar also updated:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.1'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.google.android.gms:play-services:9.0.0'
compile 'com.google.maps:google-maps-services:0.1.12'
compile 'com.google.maps.android:android-maps-utils:0.4.3'
compile 'com.google.code.gson:gson:2.6.2'
compile 'com.google.android.gms:play-services-ads:9.0.0'
compile 'com.google.android.gms:play-services-auth:9.0.0'
compile 'com.google.android.gms:play-services-gcm:9.0.0'
compile 'com.google.android.gms:play-services-location:9.0.0'
compile 'com.firebase:firebase-simple-login:1.4.2'
compile "com.google.firebase:firebase-database:9.0.0"
compile 'com.firebaseui:firebase-ui:0.4.0'
Update:
The bug has been fixed and the new build is already pushed. Here's the last official reply from the bug post.
Ok I just pushed a fix for this. There will be some propagation delay.
If you can try it in >= 1hr and let me know if it works that
would be great. Just build your project with the gradle flag
--refresh-dependencies to make sure it re-downloads deps and does not use the cached copy.
FirebaseUI is moved to jCenter in 0.4.0, thus it can't be found in mavenCentral. If it's still giving error, try to add Database and Auth dependencies separately, like this
compile 'com.firebaseui:firebase-ui-database:0.4.0'
compile 'com.firebaseui:firebase-ui-auth:0.4.0'
This has been marked as a bug already here. You can read the bug post to read more about this issue.
Here's the official reply on the bug
Ok I'm glad that solved your problem. For what it's worth,
com.firebaseui:firebase-ui:0.4.0 is just an empty library that
declares dependencies on those libraries for convenience.
I will leave this issue open until I can figure out what's going on
with my jCenter configuration, thanks for the report!
For some reason 0.4.0 is not avaible through bintray or mavencentral..
0.3.1 works though, so try that for now. I will look into it later.
'com.firebaseui:firebase-ui:0.3.1'
maoke sure you are using Jcenter.
if compile 'com.firebaseui:firebase-ui-database:0.4.0' and
compile 'com.firebaseui:firebase-ui-auth:0.4.0' still not work for you, try to go to Settings-> Build,execution, Deployment -> and disable offline Work

NoClassDefFoundError: com.firebase.ui.auth.google.GoogleAuthProvider

I'm using Android Studio 1.5 and trying to add Firebase UI library to my application.
I've added it to my dependencies.
For some reason I'm getting the NoClassDefFoundError exception.
I've read that I should add Firebase-UI jar to my 'libs' folder, but I can't find it.
Any suggestions?
Most likely your missing the Google Play Services dependency from your app's build.gradle. For reference, this is one of mine:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.firebaseui:firebase-ui:0.3.0'
compile 'com.google.android.gms:play-services-auth:8.3.0'
}
FirebaseUI depends on com.google.android.gms:play-services-auth:8.3.0 for its Google authentication. For all dependencies, see this section of the README.

Categories

Resources