Starting Android Development is easy, but having some tips is always better. I wrote some tips in this post to help you make your Android Development journey more better. These 5 tips every Android Developer should know.
#1 Don’t Reinvent The Wheel
If you need something implemented, chances are it’s already written, tested and used widely. Just do quick Google search and chances are you’ll find the right library for it. Some of the widely used library for most commons tasks are listed below
- Use Glide or Picasso for image loading
- Use Retrofit or Volley for networking
- Use Gson or Jackson for JSON parsing
- Use ButterKnife for view binding
If you don’t find a library, make your own, and open source it (if possible) so others can use it too.
#2 Use Fragments Over Activities
Android introduced Fragments a while ago. Fragments have their own lifecycles. Fragments help a lot with optimizing for various screens. You can literally put a Fragment anywhere on the screen. You can make better navigations with Fragments. You can use, combine, and positioned Fragments at your will.
Using Activities for each Screen is really inefficient, the system will keep them in memory as long as it can. It can increase ram usage, so better use Fragments instead of Activities.
#3 Use Plugins
Android Studio packs a lot of plugins in its Plugins Marketplace. You can use Plugins to make workflow easier or make coding more fun. You can find these plugins helpful
- GsonFormat for converting JSON to Java POJO classes
- ButterKnife Zelezny for making ButterKnife less painful
- String Manipulation for Strings
- Rainbow Brackets, it helps you when need to find that damn bracket
- ADB Idea for clear app data, cache directly from Android Studio
#4 Don’t Develop For Your Phone
Unless you’re building a personal app or a device-specific app, chances are your app won’t look good on every device. Try optimizing your app for most of the screens, orientations, and most of the Android versions.
You don’t own thousands of devices (probably). Here comes the emulator, you can use Android Studio’s Emulators or Genymotion to test your app on different devices.
#5 Always Run Tests Before Launching
Don’t be a fool like me, always run tests before releasing new versions of your app. Something might be broken and you may not know about it. You can run tests to ensure everything is working fine.
Broken features can make users leave negative ratings to your app. That’s why you should always run tests before launching. You can run Automated tests or Manual tests it’s up to you.
These 5 tips which every Android Developer should know, may be helpful for you. There are many more tips, but you should start with these. You will find more things with experience.
Try my new App made for Instagrammers
It have thousands of Captions and Hashtags, Feed Planner, Grid Maker, No Crop Post and many more.