New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Moving main url
out of strings.xml
#20
Comments
This is a good idea but I think the placement of the url should be elsewhere. I don't foresee it changing but having the url defined in the build.gradle and assigning during the build to be retrieved from the BuildConfig might be a better option. This allows the app to be a little more modular and still defines the url in a constants file that can be retrieved by anyone (android and java code). Just thinking out loud though. |
Thanks for pointing this out @VarunBarad. I agree with @jhw866 : having it assigned at the higher level sounds more impactful. |
I too agree with @jhw866 and suggest that we define both a |
Resolved with #27 |
Is your feature request related to a problem? Please describe.
The main url for the website (https://dev.to) is stored as a string resource. It currently works because the url is not being used at any place where a string-resource can't be accessed. But later as things are moved over to native code, there will be requirement to use that url where it is not possible to access a string resource.
For example, Retrofit is the most popular networking library and it becomes easier to integrate Retrofit when we don't have the base-url in a string resource.
Describe the solution you'd like
We move the main url of the website to a
Constants.kt
file in which we store all such urls.Additional context
The url I am mentioning is located in the linked file: https://github.com/thepracticaldev/DEV-Android/blob/master/app/src/main/res/values/strings.xml
The text was updated successfully, but these errors were encountered: