I\'m trying to play a bit with Firebase and Android.
I have one RegisterActivity, and one MainActivity.
My current flow is - start with M
I do not know FireBase but i know Android.. A Context is a global information about an application environment. Your Activity is a Context so i am pretty sure Firebase.getAndroidContext() retrieves your Application Context which is getApplicationContext(), Since that seems sensible.
Should I only call this function once in Application or once in each Activty?
call it whenever you need a Context with respects to FireBase codes- but i think will suit best if you call it in your Application class
If the answer for question 1 is only once, then where should I put it ?
what if its not once? where do you call it? i guess you will call it anywhere you need Context right? so do that irrespective of question 1's answer, but you can fall on Class.this , getBaseContext() or View.getContext() anytime