title: WakefulBroadcastReceiver is deprecated
body: <p>For creating a receiver I'm extended <code>WakefulBroadcastReceiver</code> in my old project. But now it's <code>deprecated</code>. Instead of <code>WakefulBroadcastReceiver</code> which <code>Receiver</code> I should use now and how to convert below code with new method?</p>
  
  <p>Here is my code: </p>
  
  <pre><code> public class TaskFinishReceiver extends WakefulBroadcastReceiver {
      private PowerManager mPowerManager;
      private PowerManager.WakeLock mWakeLock;
      @Override
      public void onReceive(Context context, Intent intent) {
          mPowerManager = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
          turnOnScreen();
          Intent wakeIntent = new Intent();
  
          wakeIntent.setClassName("com.packagename", "com.packagename.activity.TaskFinished");
          wakeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
          context.startActivity(wakeIntent);
      }
  
  
      public void turnOnScreen(){
          mWakeLock = mPowerManager.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK | PowerManager.ACQUIRE_CAUSES_WAKEUP, "tag");
          mWakeLock.acquire();
      }
  }
  </code></pre>