gappein / gappein-chat-sdk

A plug and play modular toolkit for integrating the Chat feature on top of Firebase!
Other
166 stars 16 forks source link

Support for automatic initialization of SDK on App startup #12

Closed PatilShreyas closed 4 years ago

PatilShreyas commented 4 years ago

It's a great library and that's why I would like to suggest an improvement which can be done here in this SDK.

Proposed solution

Advantage

Reference:


I hope you'll find this suggestion helpful.

darshanpania commented 4 years ago

@PatilShreyas We're honored that you've opened our first Github issue. 🙏

Thank you for the suggestion of using Firebase style Content Provider to initialize the library. Personally, I'm on the fence about it. Since all Content Providers are started when the Application class is initialized, it could lead to performance bottlenecks. We've gone with the manual initialize() approach so that we do not add to that problem. What are your thoughts on Content Providers vs App-Startup Library? I'll let @hi-manshu also chime in for his suggestions.

PatilShreyas commented 4 years ago

Thanks @darshanpania.

Yeah you're right. And I also thought about App startup library but currently it's not stable so I thought it would be not good to use. Internally app startup library also uses ContentProvider under the hood.

A small correction: ContentProvider is created before Application class.

hi-manshu commented 4 years ago

Thanks @PatilShreyas , I would like to say as we get granularity of controlling as developers on the SDK, we kept initialize() method there.

As we are planning a lot of things where user should have some sort of custom requirement, there this method would come useful.

PatilShreyas commented 4 years ago

Thanks, @hi-manshu for the explanation.