title: Data send from service to activity not working
body: <p>I am calling a function in service to send data to activity, i am using Local broadcast manager for this, the below is the code in service</p>
  <pre><code>    private void sendDataToActivity(List&lt;WNotificationModel&gt; notificationList) {
      Intent intent=new Intent(&quot;listDataUpdate&quot;);
      intent.putExtra(&quot;hello&quot;,&quot;helloWorld&quot;);
      LocalBroadcastManager.getInstance(context).sendBroadcast(intent);
  }
  </code></pre>
  <p>the below is the code for receiving data in activity</p>
  <pre><code>public class WNotificationList extends AppCompatActivity {
  
  private BroadcastReceiver mMessageReceiver=new BroadcastReceiver() {
      @Override
      public void onReceive(Context context, Intent intent) {
          String name=intent.getStringExtra(&quot;hello&quot;);
          Log.d(&quot;catAndDog&quot;, &quot;onReceive: &quot;+name);
      }
  };
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_where_am_ilist_notification);
  
  }
  
  @Override
  protected void onStart() {
      super.onStart();
      LocalBroadcastManager.getInstance(getApplicationContext()).registerReceiver(mMessageReceiver,new IntentFilter(&quot;listDataUpdate&quot;));
  }
  
  @Override
  protected void onStop() {
      super.onStop();
      LocalBroadcastManager.getInstance(getApplicationContext()).unregisterReceiver(mMessageReceiver);
  }
  </code></pre>
  <p>}</p>