The
productivity of your Android-based app not only depends on your
in-depth knowledge and expertise but also on the toolset,
configuration and team collaboration. It will be good that you follow
the below-mentioned practices so that you can easily enhance the
productivity of your application. In this blog, you will read about
few key points that will make your app stable and efficient.
What
does your AndroidManifest really look like?
A
lot of us are already aware that the AndroidManifest.xml that you see
in the text editor is not always the same as the one which was
included while building an application. This thing happens mainly
because the libraries which you will add in your project may have an
extra <uses-permission/> element in their manifest which is
usually blended with the permissions requested in your manifest file.
You can also take help of a skilled Android developer to locate these
permissions.
It
will be good that you check your manifest before building an APK of
your app. The new feature of Android Studio 2.2 has a merged manifest
viewer. This will tool will display your AndroidManifest that has
been merged in your project dependencies based on the variants,
flavours and build types. You can access this tool by navigating to
your AndroidManifest.xml and then clicking on the new Merged Manifest
located at the bottom.
Support
annotations are your friends
Another
useful tool is the support-annotations library. Make sure you include
them in your project by adding
“com.android.support:support-annotations:23.4.0” into your
build.gradle file. With these metadata annotations, you will enable
your code to detect bugs and define code rules. Most of the time,
use-cases are used for marking nullable and non-nullable or to
specify from which thread they should be called while doing Android
development.
Fast
and Painless code review
For
every developer, it is essential to review his code at least three to
four times. It makes sense to check how effectively the developed
feature works. The common workflow in this case is:
- Change the stashes of your current branch
- Review your branch
- Reload the gradle configuration in your IDE
- Thoroughly read the code in IDE
- First compile and launch, then test the app
- Get back to your work by repeating your actions from 1 to 5.
Make
sure you use a dedicated IDE instance and repository folder to review
your code. It will be good that you should use a machine that has at
least 16GB of RAM so that you don't have to face any lag while
carrying out this task.
Apply
changes fast
No
matter what is the size of your Android app development project you
should always spend enough time to build and deploy the latest
changes into the emulator or test device. In case you have hundreds
of classes and XML layouts that it will definitely cost your more
time, resources and even a more powerful machine. Apart from that,
you need to navigate everything manually on the application screen,
so if you changed something you will have a hard time reaching it.
Conclusion
In
this blog, you will be reading about few crucial tips that will
assist you in increasing the productivity of your Android app.
No comments:
Post a Comment