title: Andoird WiFi Direct (P2P) question about BroadcastReceiver class
body: <p>I'm trying to develop a WiFi Direct data transfer app, and <a href="https://developer.android.com/guide/topics/connectivity/wifip2p.html#create-application" rel="nofollow noreferrer">this official help page</a> is my current information source. However, I did not understand this sentence -</p>
  <pre><code>For the class' constructor, you will use parameters for the WifiP2pManager, WifiP2pManager.Channel, and the activity that this broadcast receiver will be registered in.
  </code></pre>
  <p>The <em>activity</em> they're talking about is the private member in the below class -</p>
  <pre><code>/**
  * A BroadcastReceiver that notifies of important Wi-Fi p2p events.
  */
  public class WiFiDirectBroadcastReceiver extends BroadcastReceiver {
  
     private WifiP2pManager manager;
     private Channel channel;
     private MyWiFiActivity activity; // &lt;-- THIS ONE
  
     public WiFiDirectBroadcastReceiver(WifiP2pManager manager, Channel channel,
             MyWifiActivity activity) {
         super();
         this.manager = manager;
         this.channel = channel;
         this.activity = activity;
     }
  }
  
  </code></pre>
  <p>When I try to implement the class as-it-is, I get the error <code>Cannot resolve symbol MyWiFiActivity</code>.</p>
  <p>Should I include an import of that type, or does it depend on something else I need to do later on?</p>