title: BroadcastReceiver (TIME_TICK) dies every night?
body: <p>I want to write some kind of background-live-ticker app for sports-web-services...
  I would like my app to be able to call the TIME_TICK all the time.</p>
  
  <p>Btw: I also tried to use the AlarmManager, but the problem is the same.</p>
  
  <p>But now my problem...</p>
  
  <p>I use a Receiver with a Service for the execution part.
  The Receiver is called every minute correctly after register.
  But every night the service is terminated and will never be called again.</p>
  
  <p>On Android 2.x everything works fine but Android 4.x will stop the Receiver every day...
  Is there any posibility to keep the app alive on Android 4.x?</p>
  
  <p><em><strong>The Reveiver is registered in my Main-Activity:</em></strong></p>
  
  <pre><code>registerReceiver(new MyReceiver(), new IntentFilter(Intent.ACTION_TIME_TICK));
  </code></pre>
  
  <p><em><strong>Manifest-entries:</em></strong></p>
  
  <pre><code>&lt;service android:name="de.pepdev.MyService" /&gt;
  &lt;receiver android:name="de.pepdev.MyReceiver"&gt;
      &lt;intent-filter&gt;
          &lt;action android:name="android.intent.action.TIME_TICK" /&gt;
      &lt;/intent-filter&gt;
  &lt;/receiver&gt;
  </code></pre>
  
  <p><em><strong>Receiver-class:</em></strong></p>
  
  <pre><code>public class MyReceiver extends BroadcastReceiver
  {
      public static   long        nextExecTime    = 0;
      public static   Calendar    currentTime     = Calendar.getInstance();
  
      @Override
      public void onReceive(Context context, Intent intent)
      {
          currentTime = Calendar.getInstance();
  
          if(nextExecTime &lt;= currentTime.getTimeInMillis())
          {
              Intent service = new Intent(context, MyService.class);
              context.startService(service);
          }
      }
  }
  </code></pre>