Author name: sohailaziz

Convenient Logger for android

Read Time < 1 minuteLogging is an important technique of debugging during application development. Android provide Log class for logging different log-level messages. However in order to easily filter the log messages (in Logcat) and directly pinpointing the location of log message is a bit tricky (with default Log class). I have implemented my own Log class primarily: To …

Convenient Logger for android Read More »

Application Class: Application-wide data sharing #android

Read Time 2 minutesThere are cases when we need to share same data to all application components and we want anyone to be able to update that data. Example of this use-case can be application settings e.g shared preferences. Application class instance is initiated before any other component and remained there till the application terminate. You can think …

Application Class: Application-wide data sharing #android Read More »

Scheduling activities, services and broadcasts #Android

Read Time 2 minutesAlarmManager comes into play when we need to schedule different task in some future time/date or we need to execute some task repeatedly. AlarmManager is android service provided for scheduling purposes. We can use AlarmManager to start activities/services and to send broadcast in some future date/time. Activities, Services or broadcasts registered with AlarmManager will be …

Scheduling activities, services and broadcasts #Android Read More »

Broadcast Receiver: Two ways to implement part-2

Read Time < 1 minuteIn the previous tutorial, we discussed how to implement/register broadcast receiver inside an activity. Broadcast receiver is a standalone application component which means it will continue running even when other application component are not running. That’s why we unregister broadcast receiver in onPause on the activity.Second way of using broadcast receiver is to register it …

Broadcast Receiver: Two ways to implement part-2 Read More »

Broadcast Receiver: Two ways to implement part-1

Read Time 2 minutesI got confused while learning about the broadcast receiver after browsing around the web. Some people register it inside activities while other register it in manifest. The purpose of this tutorial is to explain both ways and the use-cases when to use which implementation. Broadcast receiver is an application component like activity and service. Its …

Broadcast Receiver: Two ways to implement part-1 Read More »

A complete Contentprovider

Read Time 6 minutesMyContentProvider Much have been written about contentproviders and there are various tutorials and examples available. I walk through many of those tutorials during my learning of custom contentprovider. However none of those tutorial gave me complete and clean implementation details.Aim of this post is to show you a complete [all necessary function implementation] and clean …

A complete Contentprovider Read More »

https:// what it is ?

Read Time 2 minutesHttps is way of securing http(web) traffic. There are many versions of establishing encrypted http connection but we will discuss here only the simplest one, used by most of the web sites running on https. Examples of these can by encrypted.google.com , gmail.com etc. Whenever there is an https (encrypted connection) you will notice https:// …

https:// what it is ? Read More »

LocalBroadcastManager: Intra application message passing

Read Time 2 minutesUsing Broadcast receivers is good practice if you want to send and receive data between different applications. However its not good at all if you are using them for communication internal to application. There are many reasons for NOT using broadcast:  A broadcast is sent system-wide, so this is not performance efficient.  When we use …

LocalBroadcastManager: Intra application message passing Read More »