I've been using this for a couple of years and It's convenient when you have multiple environments like staging, uat, and production with other API keys. You only need to switch the Build type and the base url, which will reflect the entire project.
Fun fact: There is a concept called build flavours, with this you can have one codebase and multiple build variants for different vendors, you can change everything and not just base urls and strings, you can totally change all the primary colors, images and much more specific to the variants. I once had a bill generator application, which later sold it to multiple small scale businesses using the flavours, any future modification can affect all the variants and each variant has their own logs, texts,colors etc..
You can even use flavors to have multiple versions for your app, for example, staging environment and release environment, and you can have two version on same device
both types of base url are not so good. because it dont give you flexible for change test base url. usually on big projects you can have more than 1 base url for test servers. in debug and internal builds for testers we should have tools for write your own debug or test base url
I've been using this for a couple of years and It's convenient when you have multiple environments like staging, uat, and production with other API keys. You only need to switch the Build type and the base url, which will reflect the entire project.
PHENOMENAL!!!!
It makes a lot of sense. I wouldn't want to clutter my code with things that depend on build variants. Thanks for the tip
Glad it was helpful!
You can also store the string in res and have a custom debug/res folder for non prod builds.
Or similarly, constants in code where you have different versions of the file under different source roots.
Fun fact: There is a concept called build flavours, with this you can have one codebase and multiple build variants for different vendors, you can change everything and not just base urls and strings, you can totally change all the primary colors, images and much more specific to the variants.
I once had a bill generator application, which later sold it to multiple small scale businesses using the flavours, any future modification can affect all the variants and each variant has their own logs, texts,colors etc..
This way I don't have to worry about the Base URL Thankyou mate it helped me a lot 🙂
Man I love all your contents,every time a learn something new. Thanks for sharing !
Glad to hear it!
You can even use flavors to have multiple versions for your app, for example, staging environment and release environment, and you can have two version on same device
This a very basic thing. But yes, there are still people who does it the wrong way. Thanks for taking time to share this
It’s not “the wrong way” but a different less elegant way
Very helpful, I will change my project's code after exam. Thanks for sharing ,phillip.
Very nice tip, your videos always teach new things, 😄
Too helpful ☺️ Thanks @Philipp
Very useful
Awesome
both types of base url are not so good. because it dont give you flexible for change test base url. usually on big projects you can have more than 1 base url for test servers. in debug and internal builds for testers we should have tools for write your own debug or test base url
Finally, a content I'm already aware of haha
Really helpful 😮
Useful ✌️
When someone tries to decompile your application, he won't see anything.
Can you please provide a tutorial on mongodb Google auth with direct remote mongo database connection in compose kotlin
Please make more useful video like this
careful with the url for release... do test before shipping 😂
Esta información vale millones....
awesome tip
Nice
Where are you from?
How do you do this in Python
import app
app.run()
..but the thing is, my gradle takes like a year to build anything.
are there any advantages over using debug/res ?
How could you do this with Flavors?
I have to sync my build everytime i change it
How often do you change these that this is a problem lol
What if I want to give signed apk with debug URL?
This should be release also
Actually I don't need that, it's not useful for my eyes 👀
Useful ✌️