To use the Application you need to put your own API-Key
from Developer Account here
Create a File inside your root project directory like --> <YourFileName>.properties
inside it put your API-Key API_KEY_STRING = "<Your Key Belongs Here>"
Then inside your build.gradle(:app)
put the below code
def apikeyPropertiesFile = rootProject.file("<YourFileName>.properties")
def apikeyProperties = new Properties()
apikeyProperties.load(new FileInputStream(apikeyPropertiesFile))
Then
android {
...
defaultConfig {
...
// Load API Key.
buildConfigField("String", "API_KEY_STRING", apikeyProperties['API_KEY_STRING'])
}
Rebuild your project to generate buildConfig File with your Api Key.
//You can now use your Api key inside your code.
val apiKey = BuildConfig.API_KEY_STRING