title: Use a class constructor in Android
body: <p>I need to instantiate a class in the MainActivity class .Therefore i used the constructor defined on the class but the problem it includes some parameters that i dont know how to instantiate with. </p>
  
  <p>this is the class constructor:(please see the comments)</p>
  
  <pre><code>public class FallbackLocationTracker  implements LocationTracker, LocationTracker.LocationUpdateListener {
  
  
  private boolean isRunning;
  
  private ProviderLocationTracker gps;
  private ProviderLocationTracker net;
  
  private LocationUpdateListener listener;
  
  Location lastLoc;
  long lastTime;
  
  public FallbackLocationTracker(Context context, ProviderLocationTracker.ProviderType type) {
      gps = new ProviderLocationTracker(context, ProviderLocationTracker.ProviderType.GPS);
      net = new ProviderLocationTracker(context, ProviderLocationTracker.ProviderType.NETWORK);
  }
  </code></pre>
  
  <p>And this is what i have done in the Mainactivity :</p>
  
  <pre><code>public class MainActivity extends Activity {
  
  GPSTracker gps;
  
  
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
  
      super.onCreate(savedInstanceState);
  
      gps = new FallbackLocationTracker( );//What should i do here to make use of the class and all the methods ??
  
  }
  </code></pre>