Intent.getAction() is throwing Null + Android <p>I have written BroadcastReceiver for sort of Alarm application. In onReceive method I am reading Intent.getAction(). <strong>It is running well in all of the versions *<em>except in SDK version 1.5 where it throws null pointer exception</em>*</strong>. I am setting the action in another activity where I am calling broadcastReceiver. Please help me out with this. Below is the code snippet for both receiver and activity classes,</p> <p><strong>ProfileActivity.java</strong></p> <hr> <pre><code>public static final String STARTALARMACTION = "android.intent.driodaceapps.action.STARTPROFILE"; public static final String STOPALARMACTION = "android.intent.driodaceapps.action.STOPPROFILE"; AlarmManager alarmMan = (AlarmManager) getSystemService(Context.ALARM_SERVICE); Intent startIntent = new Intent(this,AlarmReceiver.class); startIntent.setAction(STARTALARMACTION); Intent stopIntent = new Intent(this,AlarmReceiver.class); stopIntent.setAction(STOPALARMACTION+intentposition); </code></pre> <h2><strong>AlarmReceiver.java</strong></h2> <pre><code>@Override public void onReceive(Context context,Intent intent){ String intentAction = intent.getAction(); Log.d(TAG,"Intent:"+intentAction); **//throwing null** </code></pre> <p>After getting the error I tried my luck by giving the actions in of .manifest file. But no use. </p> <p>Please help me.</p> <p>Thanks.</p>