Last active
September 29, 2021 08:37
-
-
Save AlirezaNezami96/44f5a3b2e36947254ed8c510e553bfdc to your computer and use it in GitHub Desktop.
create DatabaseService and NetworkService when onCreate method called
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyApplication : Application() { | |
var networkService: NetworkService? = null | |
var databaseService: DatabaseService? = null | |
override fun onCreate() { | |
super.onCreate() | |
networkService = NetworkService(this, "SOME_API_KEY") | |
databaseService = DatabaseService(this, "dummy_db", 1) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment