Skip to content

Implement Firebase remote config API #192

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 13 commits into from
Jul 6, 2021

Conversation

shepeliev
Copy link
Contributor

Closes #134
Closes #172

@shepeliev shepeliev marked this pull request as ready for review June 8, 2021 07:13
@nbransby
Copy link
Member

Hey thanks @shepeliev this looks great! Couple of suggestions:

  • We try and match the android ktx library api as closely as possible:
  • For example you should remove getValue from the FirebaseRemoteConfig and just replace with the operator version that the kotlin extensions adds

@shepeliev
Copy link
Contributor Author

Hey thanks @shepeliev this looks great! Couple of suggestions:

  • We try and match the android ktx library api as closely as possible:
  • For example you should remove getValue from the FirebaseRemoteConfig and just replace with the operator version that the kotlin extensions adds

Thanks for reviewing. Yes, it makes sense. I'll rework it soon.

@nbransby
Copy link
Member

Actually why dont we go one step further and use a reified type param to also replace all the get*Type* methods, e.g:

    inline operator fun <reified T> get(key: String): T = when(T::class) {
        String::class -> android.getString(key)
        FirebaseRemoteConfigValue::class -> android.getValue(key)
        ...
        else -> throw IllegalArgumentException()
    } as T

@shepeliev shepeliev marked this pull request as draft June 14, 2021 08:01
@shepeliev
Copy link
Contributor Author

Actually why dont we go one step further and use a reified type param to also replace all the get*Type* methods, e.g:

    inline operator fun <reified T> get(key: String): T = when(T::class) {
        String::class -> android.getString(key)
        FirebaseRemoteConfigValue::class -> android.getValue(key)
        ...
        else -> throw IllegalArgumentException()
    } as T

That looks great. Just pushed an update.

@shepeliev shepeliev marked this pull request as ready for review June 14, 2021 09:39
@suntrix
Copy link
Contributor

suntrix commented Jun 28, 2021

@nbransby any ideas when this will be merged?

@Reedyuk Reedyuk requested review from nbransby and Reedyuk July 5, 2021 16:27
@Reedyuk
Copy link
Collaborator

Reedyuk commented Jul 5, 2021

@shepeliev - is it possible to rename it? Google refers to theirs as the project being called firebase-config and their imports are Firebase.remoteConfig(you have done the import object right, its just the name of the project/directories that needs changing).

@Reedyuk
Copy link
Collaborator

Reedyuk commented Jul 5, 2021

Rest looks great!

@shepeliev
Copy link
Contributor Author

@shepeliev - is it possible to rename it? Google refers to theirs as the project being called firebase-config and their imports are Firebase.remoteConfig(you have done the import object right, its just the name of the project/directories that needs changing).

Yep, you are right about naming the project. I think I'll do it in a couple of hours tonight.

@Reedyuk Reedyuk merged commit 0e87958 into GitLiveApp:master Jul 6, 2021
@shepeliev shepeliev deleted the remote_config branch June 13, 2022 18:04
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Firebase Config Add implementation for remote-config
4 participants