Are you struggling to complete you project in short period of time? Do you wish to deliver your product in shorter notice? Try to speed up your development with following shortcuts. Mac 1. Indentation: Option+Command+L 2. Delete unused import: Control+Option+O 3. Code Completion (Shows hints): Command+Space 4. Issue quick fix: Option+Enter 5. Surround code block: … Continue reading Android Studio Shortcuts
Permission Protection Levels
There are three protection levels that affect third-party apps: normal, signature, and dangerous permissions. Normal Protection Level This kind of permission are given when there is absolutely no risk to user’s privacy or the operation of other apps. In such kind of permission no permission granting dialog are prompt. User cannot revoke this kind of … Continue reading Permission Protection Levels
Esoteric Programming Language
Are you hard core programmer or a hacker? Do you want to test your limits? Try esoteric programs. Now for the one who don’t know the term esoteric programming, it means a computer programming language designed to experiment with weird ideas, to be hard to program in, or as a joke, rather than for practical … Continue reading Esoteric Programming Language
Different ways to handle click events in Android
Member Class: This is useful when several listeners require similar processing than can be handled by a single class. public class MainActivity extends Activity { Button button1; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); button1=(Button)findViewById(R.id.button1); button1.setOnClickListener(new … Continue reading Different ways to handle click events in Android
Eliminating Code Overheads in Android Program
Optimisation always falls in 3 categories Memory, I/O ,CPU cycles which in turn target improvement in battery usage. CPU: 1. Do not nest multi pass layout. 2. Lazy compute complex data when needed 3. Cache heavy computational result for re-use 4. Consider Render Script for performance. 5. Keep work off the Main thread. … Continue reading Eliminating Code Overheads in Android Program
Memory Leak in Singleton Pattern
Singleton Design Pattern is basically used when we want to limit object creation. Singleton Design Pattern is considered one of the most simple design pattern. The main concern of this pattern is to ensure that only one instance of a class is created and provide a global point of access to the object. We … Continue reading Memory Leak in Singleton Pattern
Auto backup of Android Application
Android market has increased tremendously. Every day new mobile phone gets launch, and while uninstalling our app from old phone app's data gets lost. As a developer it would always be a great idea backup your user's app data to their google drive, so when they reinstall the app they can fetch back their data … Continue reading Auto backup of Android Application
Reduce .apk file size by WebP
If we are dealing with the application which uses significant amount of images then png and jpeg format would be occupying more space. WebP is the Image format from Google for better compression than JPEG and PNG files. Using WebP developer can create rich and compact image. The statics shows that lossless image is 26% … Continue reading Reduce .apk file size by WebP
Why we need Kotlin?
Why we need another programming language when we have such a productive language called as Java for Andorid Development, which has been used since decades?. Is Kotlin that potent and useful? Will it stand equal or far better than Java? Well answer for all this depend on the furture reading. Kotlin’s primary development is from … Continue reading Why we need Kotlin?
ART (Android Runtime)
We all are well know by the term “Dalvik” and its usage. Dalvik is a virtual machine (VM) for Android operating system. Java program which are compiled by Java compiler in bytecode and store in .class file which are given to dx tool for translating it into Dalvik bytecode which are store in .dex file. This dex … Continue reading ART (Android Runtime)