-1

Here is the program code. Please help me.

public void onStart(Context paramIntent, int paramInt)
      {
        //super.onStart(paramIntent,paramInt);//ERROR IN THIS LINE
        this.dbhelper = new DBHelper(getApplicationContext());
        this.db = this.dbhelper.getReadableDatabase();
        this.c = this.dbhelper.getPlaces(this.db);
        this.locManager = ((LocationManager)getSystemService("location"));
        this.db.close();
        this.am = ((AudioManager)getSystemService("audio"));
        if (this.locManager != null)
        {
          if (!this.locManager.isProviderEnabled("gps"))
          {
            startActivity(new Intent("android.settings.LOCATION_SOURCE_SETTINGS"));
            Toast.makeText(paramIntent, "Enable Gps!", 1).show();
          }
          this.locManager.requestLocationUpdates("gps", 300000L, 10.0F, this);
        }
      }
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • It should be `public void onStart(Intent intent, int paramInt)` not `public void onStart(Context paramIntent, int paramInt)` – Piyush Dec 05 '14 at 10:30

1 Answers1

-1

@Piyush Gupta wrote:

It should be:

 public void onStart(Intent intent, int paramInt)

not

public void onStart(Context paramIntent, int paramInt)
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129