title: Pass string information from Fragment to BroadcastReceiver
body: <p>I am using <code>ACTION_UNINSTALL_PACKAGE</code> to uninstall packages and am trying to retrieve the application name of the removed package after it is removed. I can only seem to get the package name. I cannot use <code>ApplicationInfo</code> on the package name since the package is already gone. I tried passing the value into the intent but since it goes to another activity that is not owned by me <code>UninstallerActivity</code> it is not there. I couldn't figure out how to pass the string into the IntentFilter data field since I need to use it for package name. I am not using <code>sendBroadcast</code> so I cannot use that.</p>
  
  <pre><code>@Override
          public void onClick(View v) {
  Intent intent = new Intent(Intent.ACTION_UNINSTALL_PACKAGE);
              intent.setData(Uri.parse("package:"+packageName));
              intent.putExtra(Intent.EXTRA_RETURN_RESULT, true);
              IntentFilter intentFilter = new IntentFilter();
              intentFilter.addAction("android.intent.action.PACKAGE_REMOVED");
              intentFilter.addDataScheme("package");
  
              mContext.registerReceiver(mUninstallReceiver, intentFilter);
              startActivity(intent);
  }
  
  private BroadcastReceiver mUninstallReceiver = new BroadcastReceiver(){
  @Override
  public void onReceive(Context context, Intent intent) {
      final String action = intent.getAction();
  
      if (action != null) {
  
          if (action.equals(Intent.ACTION_PACKAGE_REMOVED)) {
             Uri intentData = intent.getData();
             //the above only contains package name
          }
      }
   }
  }
  </code></pre>
  
  <p><strong>How do I pass the application name to this broadcast receiver?</strong></p>
  
  <p><strong>Update</strong></p>
  
  <p>I ended up just using a member variable which isn't what I totally wanted, but it works.</p>