title: Broadcast Data using Alarm Manager
body: <p>I am trying to send data to my parse SDK Database using Alarm Manager.</p>
  
  <p>I am able to send data without Alarm manager.</p>
  
  <p>My below code is not working correctly as parse sdk database is not showing updated data.</p>
  
  <p>Here is my code:</p>
  
  <p><strong><code>Main Activity.java</code></strong></p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          setContentView(R.layout.create_todo);
          setTitle(R.string.create_todo);
          alarmMgr = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
          Intent intent = new Intent(this, AlarmReceiver.class);
          alarmIntent = PendingIntent.getBroadcast(this, 0, intent, 0);
  
          alarmMgr.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,
                  AlarmManager.INTERVAL_FIFTEEN_MINUTES,
                  AlarmManager.INTERVAL_FIFTEEN_MINUTES, alarmIntent);
  }
  </code></pre>
  
  <p><strong><code>AlarmReceiver.java</code></strong></p>
  
  <pre><code>public class AlarmReceiver extends BroadcastReceiver {
      @Override
      public void onReceive(Context context, Intent intent) {
          MyAsyncTask asyncTask = new MyAsyncTask();
          asyncTask.execute(new String[]{});
      }
  
  
      class MyAsyncTask extends AsyncTask&lt;String,Void,String&gt;
      {
  
          @Override
          protected String doInBackground(String... params) {
              try {
                  ParseObject parseObject = new ParseObject("Todo");
                  parseObject.put("name", "abc");
                  parseObject.save();
              }
              catch(ParseException e)
              {
              }
              return null;
          }
      }
  }
  </code></pre>