Activity as Broadcast receiver

In this post I show how to instantiate a broadcast receiver in an activity. An example for which this kind of broadcast receiver is useful is when calling the GCM library service to register/unregister from the GCM servers. When the service asynchronously receives the response from GCM servers, if the …

How to hide Title and set Fullscreen mode in Android

To hide the activity view title programmatically, insert the following line in the onCreate method of the main activity: requestWindowFeature(Window.FEATURE_NO_TITLE); To set fullscreen mode, add this one: getWindow().setFlags( WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); The onCreate method would look like: