Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sanjaydevtech/iconfinderandroid

IconFinder Api integrated into Android
https://github.com/sanjaydevtech/iconfinderandroid

android hilt iconfinder-api jetpack-compose kotlin retrofit

Last synced: 19 days ago
JSON representation

IconFinder Api integrated into Android

Awesome Lists containing this project

README

        

# Icon Finder Android App

[IconFinder](https://www.iconfinder.com/)

[IconFinder docs](https://developer.iconfinder.com/reference/overview-1)

## Tech
- Jetpack Compose
- Hilt
- Retrofit

## Setup
- Get an api key from IconFinder
- Create a `secrets.properties` file in the root of the project
- Paste the API key as `API_KEY=`
- Add the below function in `app/build.gradle` file
```groovy
static def getApiKey(){
def props = new Properties()
try {
props.load(new FileInputStream(new File('secrets.properties')))
return props['API_KEY']
} catch(ignored) {
return ""
}
}
```
- Add the API Key in build configuration
```groovy
android {
//...
buildTypes {
debug {
// for debug
buildConfigField "String", "API_KEY", "\"${getApiKey()}\""
}
release {
// for release
buildConfigField "String", "API_KEY", "\"${getApiKey()}\""
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
```
- Sync, Build & run!!! :)