Hey Backendless team, I have another question on the missions, hopefully, the last one but it’s around the Push Mission and setting up android studio and firebase.
I was hoping it was set up correctly but obviously not, I have gone through the documentation a couple of times and don’t think I missed anything - but I likely did… However, it seems like the android studio has updated recently and firebase-analytics have updated so you no longer need firebase-core implementation as well which threw me off. So here’s my rundown of everything.
Image 1 - When selecting a project in Android studio I selected Basic Activity, is this the correct template?
Image 2, 3 - After setting up a firebase account and getting the google-services.json file in the app folder I don’t see anything in android studio after syncing/rebuilding. Should this be the case?
Image 3 - Is the app build.gradle file that has all the implementations in it, I was getting errors when building with firebase-core:16.0.5 after reading the latest firebase documentation it seems that firebase-core is now standard in firebase-analytics:17.4.4 and this allowed a successful rebuild.
Image 6 - Main Activity - It looks like I’m getting a lot of errors in this one and I’m not totally sure what to do about it as it looks the same from the video tutorial.
As far as I can tell, the two things that seem off are the fact that I’m not sure it’s actually using the google-services json file (Firebase can’t tell if it communicated with it recently) and the fact I’m getting a ton of errors on the Main Activity page.
Am I missing anything super obvious or how should I proceed?
app id = E1AC02F7-200D-7D96-FF38-C3117302B100
android key = 227DBF9A-1DC8-4C8F-829A-D1A77EFD4473
I’ve added google-services.json to the app folder which is what google recommends. Other people have said drag and drop into the UI but that didn’t work either. Is there something I need to do to import the file into the android studio project? Everything I have read said just put it in the folder or drag and drop.
Ahh I did find import com.backendless.Backendless; in the quick start guide. I’m not sure that was mentioned in the other documentation and in the video the imports were hidden so I couldn’t tell what else was needed. Is there a place where I can find all the imports?
I have also added the following:
import java.util.ArrayList;
import java.util.List;
But I’m also getting cannot resolve DeviceRegistrationResult, Toast, BackendlessFault
google-services.json must be in your project. If it is not done, then the registration with the google servers to receive push notifications will not work. This is what it should look like in Android Studio:
@mark-piller That looks like it did it! Thanks for working that out with me, again, I apologize for the rudimentary questions but getting pointed in the right direction was really helpful!
For completeness sake and anyone who stumbles upon this thread, these are my files that were slightly different from the documentation.