Moving hardcoded URLs from About Activity to a constant file
See original GitHub issueSummary: There are many hardcoded strings which makes them difficult to locate and change the URL in case needed, so I think we should move them build.gradle file.
like
@OnClick(R.id.about_credits)
public void launchCredits(View view) {
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/blob/master/CREDITS/\\"));
}
@OnClick(R.id.about_privacy_policy)
public void launchPrivacyPolicy(View view) {
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Privacy-policy\\"));
}
@OnClick(R.id.about_faq)
public void launchFrequentlyAskedQuesions(View view) {
Utils.handleWebUrl(this,Uri.parse("https://github.com/commons-app/apps-android-commons/wiki/Frequently-Asked-Questions\\"));
}
Would you like to work on the issue? Yes
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Moving Objective-C hard-coded string literals to constants ...
I have a project source code with like 100s of classes that liberally uses hard coded strings throughout the code.
Read more >"Hard coded" vs. configuration files for values in libraries ...
The argument for having the values "hard-coded" is that you see the values right there in the code. The argument for having values...
Read more >Hardcoded Delays - UiPath Documentation Portal
Rule ID: UI-PRR-004 Scope: Activity Description Displays a list of all the activities that contain hardcoded delay values in properties such as DelayMS, ......
Read more >How to Easily Update URLs When Moving Your WordPress Site
Go ahead and enter the new link under the 'Target URL' field and select '301 Moved Permanently' as the Redirection Type from the...
Read more >Dynamic URLs vs. static URLs | Google Search Central Blog
One example would be to generate files for all the paths and make them accessible somewhere on your site. However, if you're using...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@maskaravivek I think, test can be written easily by using IntentMatchers.hasData() and passing the URL string from the constant file 😃
Will it be difficult to write a unit test if the urls are in a constants file?