Categories

Archives

Get Phone State When Someone is calling using BroadcastReceiver Example

In this article we shall try to listen to the phone state when contacts are calling us.
First of all we need to set our Manifest file to listen to the Phone State, to do that we need to edit our it.
<application>
…..
<receiver android:name=”.ServiceReceiver”>
<intent-filter>
[...]

Getting Battery Information on Android

Getting the Battery Information in Android without Apps like AnyCut, Power Manager or System Monitor is one of the hardest task. You can try those if you have an Android phone, anyway here is how to get the Battery Information (some of the codes are undocumented).
public class Main extends Activity {
private TextView [...]