title: Can't change textview (broadcastreceiver)
body: <p>I'm trying to change my textview, but it doesn't work.</p>
  
  <p>MainActivity:</p>
  
  <pre><code>public void changeTxt(String txt){
      TextView t = (TextView) findViewById(R.id.wifiName);
      t.setText(txt);
  }
  </code></pre>
  
  <p>BroadcastReceiver:</p>
  
  <pre><code>MainActivity ma;
  @Override
  public void onReceive(Context context, Intent intent) {
      ma= new MainActivity();
      int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
      boolean isCharging = status == BatteryManager.BATTERY_STATUS_CHARGING ||
                          status == BatteryManager.BATTERY_STATUS_FULL;
  
      int chargePlug = intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, -1);
      boolean acCharge = chargePlug == BatteryManager.BATTERY_PLUGGED_AC;
      String txt = acCharge+"";
      ma.changeTxt(txt);
  }
  </code></pre>