Monday, August 24, 2015

Android Podcasts

Important Podcasts to Follow on Android.

There is insanely great information made available through these podcasts. I generally find it more appealing to listen to these podcasts cause you get to hear the views from top notch developers on android and their ideas about how few things can be implemented in more efficient manner.

I urge every budding developer to follow these podcasts

Wednesday, August 19, 2015

BroadCastReceiver and Worker thread

Don’t start a worker thread from a broadcast receiver

As soon as the onReceive () method of the broadcast receiver returns , the broadcastreciever object is marked for Garbage Collection . BroadCastReceiever Is really a transient object so don’t try to run long running task in the onReceive () itself.

Good thing would be to start a service rathan than starting a worker thread in broadcastreceiver class. 
Lets say if Broadcastreceiver was the only application component in memory then as soon as the onReceive () method returns , system thinks that its an empty process and might just kill the application in the interest of freeing up memory cause these are the ideal candidates to get killed first and system is unaware that you have started a worker thread .


Since service is an application component system will see that component running and will not touch it unless otherwise there is really no option.


System will try to keep that process around yey :-.after all isnt that what we want as an application developers

Sunday, August 16, 2015

Android Studio keyboard ShortCuts

Type less and code more 

    One of the things that can quickly get you out of the main stream of thought is typing lot of boiler plate code.

    I have recently started doing development in IntelliJ IDE and its really awesome [ I am still learning :-) ] and what i have realised is using these live templates really help me focus on the main algorithm rather than getting bogged down by the shear typing involved in implementing the code.

    I hope you will really like it.  

 Be friends with Alt + Enter / Alt + Insert

        These will be undoubtedly the most used keys .
         Alt + Enter  -. Refactor / Imports / TypeCast
         Alt + Insert  -  Getter / Setter / Constructor / Override Methods

 Find a particular class by its name : ctrl + n

 The cool thing thats happening here is you can actually write only camel letters and give a colon and
 a number to go to a particular line     
 

Find all recently edited files :double shift



If you are presenting use presenstation mode : View -> Enter presentation mode