SHARE
TWEET

Untitled

a guest Feb 18th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. package pl.marcel.quizapp
  2.  
  3. import android.app.Application
  4. import android.content.Context
  5. import android.content.res.Resources
  6. import com.beardedhen.androidbootstrap.TypefaceProvider
  7. import com.google.firebase.auth.FirebaseAuth
  8. import com.google.firebase.auth.FirebaseUser
  9. import com.google.firebase.database.FirebaseDatabase
  10.  
  11.  
  12. //Klasa aplikacji wystawia singletony i inicjalizuje czcionki emotkowe
  13. class QApp : Application() {
  14.  
  15.     override fun onCreate(){
  16.         super.onCreate()
  17.         TypefaceProvider.registerDefaultIconSets()
  18.         res = resources
  19.         ctx = applicationContext
  20.  
  21.         fData = FirebaseDatabase.getInstance()
  22.         fAuth = FirebaseAuth.getInstance()
  23.  
  24.         fUser = fAuth.currentUser
  25.     }
  26.  
  27.     companion object{
  28.         lateinit var ctx: Context
  29.         lateinit var res: Resources
  30.  
  31.         lateinit var fData: FirebaseDatabase
  32.         lateinit var fAuth: FirebaseAuth
  33.  
  34.         var fUser: FirebaseUser? = null
  35.     }
  36. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top