Using setAndroidContext(this) in fragment
<p>Basically i am new to the fragment, i have to connect my database with my fragment and for that i have to initialize my firebase context but it gives error under (this). Any alternative for that?</p>

<h2>CODE</h2>

<pre><code> public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        if (savedInstanceState == null) {
            Firebase.setAndroidContext(this); //error
        }
}
</code></pre>