My Intent script always showing an error
<p>i'm creating a login application
the login script is ok it's returned true and false</p>

<p>if the response returns true or 1, i want to make it to go to another activity called inputBarcode, the eclipse showing an error on my Intent line and i don't know what to do</p>

<p>i didn't know the other variations of making Intents</p>

<p>this is my full code, the Intent that i want to call is on the bottom after if(res.equals("1")){ : </p>

<pre><code>    package com.nigmagrid.go;

    import android.app.Activity;
    import android.content.Intent;
    import android.os.Bundle;
    import android.view.View;
    import android.view.View.OnClickListener;
    import android.widget.AdapterView;
    //import android.widget.AdapterView.OnItemSelectedListener;
    import android.widget.ArrayAdapter;
    import android.widget.Button;
    import android.widget.EditText;
    import android.widget.Spinner;
    import android.widget.TextView;
    import android.widget.Toast;

    import java.util.ArrayList;
    import org.apache.http.NameValuePair;
    import org.apache.http.message.BasicNameValuePair;

    public class login extends Activity {

        String lokasiTugas;

        boolean status_npp;
        boolean status_password;
        boolean status_lokasi;

        Button button;
        EditText usernameEditText, passwordEditText;
        TextView error;
        Spinner lokasiSpinner;

        final int minNPP = 3;

        /** Called when the activity is first created. */
        @Override
        public void onCreate(Bundle icicle) {
            super.onCreate(icicle);

            setContentView(R.layout.login);

            final Button button = (Button) findViewById(R.id.login_button);
            final EditText usernameEditText = (EditText) findViewById(R.id.login_npp);
            final EditText passwordEditText = (EditText) findViewById(R.id.login_password);
            final Spinner lokasiSpinner = (Spinner) findViewById(R.id.spinner1);
            final TextView error = (TextView) findViewById(R.id.login_status);

            ArrayAdapter&lt;CharSequence&gt; adapter = ArrayAdapter.createFromResource(
                    this, R.array.lokasi_array, android.R.layout.simple_spinner_item);
            adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);

            lokasiSpinner.setAdapter(adapter);

            lokasiSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
                @Override
                public void onItemSelected(AdapterView adapter, View v, int i, long lng) {
                    //Toast.makeText(getApplicationContext(), adapter.getItemAtPosition(i).toString(), Toast.LENGTH_SHORT).show();
                    lokasiTugas = adapter.getItemAtPosition(i).toString();
                }

                @Override
                public void onNothingSelected(AdapterView arg0) {
                    //do something else
                }
            });  

            button.setOnClickListener(new View.OnClickListener() {
                public void onClick(View v) {

                    error.setText("Menghubungkan ke server...");

                    ArrayList&lt;NameValuePair&gt; postParameters = new ArrayList&lt;NameValuePair&gt;();
                    postParameters.add(new BasicNameValuePair("username", usernameEditText.getText().toString()));
                    postParameters.add(new BasicNameValuePair("password", passwordEditText.getText().toString()));

                    String response = null;

                    String sNPP = usernameEditText.getText().toString().replace(" ", "");
                    String sPassword = passwordEditText.getText().toString();

                    // validasi NPP
                    if(sNPP.length()&lt;=minNPP){
                        usernameEditText.setError("NPP minimal "+minNPP+" angka");
                        status_npp = false;
                    }else{
                        status_npp = true;
                        //Toast.makeText(getApplicationContext(), "NPP Anda : "+sNPP, Toast.LENGTH_SHORT).show();
                    }

                    // validasi Password
                    if(sPassword.length()&lt;1){
                        passwordEditText.setError("Kata sandi diperlukan");
                        status_password = false;
                    }else{
                        status_password = true;
                    }

                    //validasi lokasiTugas
                    if(lokasiTugas.equals("Pilih Lokasi")){
                        Toast.makeText(getApplicationContext(), "Lokasi Tugas diperlukan", Toast.LENGTH_SHORT).show();
                        status_lokasi = false;
                    }else{
                        status_lokasi = true;
                    }

                    // pengecekan akhir
                    if(status_npp == true &amp;&amp; status_password == true &amp;&amp; status_lokasi == true){

                        //Toast.makeText(getApplicationContext(), "NPP Anda : "+sNPP+"\nLokasi : "+lokasiTugas, Toast.LENGTH_SHORT).show();


                        //fungsi login disini :D

                        try{
                            // variabel cek-nya ganti
                            String cek = "http://almezuflash.zxq.net/kspt-android/ceklogin.php";
                            response = CustomHttpClient.excecuteHttpPost(cek, postParameters);
                            String res = response.toString();
                            res = res.replaceAll("\\s", "");

                            Toast.makeText(getApplicationContext(), res, Toast.LENGTH_SHORT).show();

                            if(res.equals("1")){
                                error.setText("Login sukses");
                                Toast.makeText(getApplicationContext(), "Login Sukses", Toast.LENGTH_SHORT).show();
// i want to make Intent but eclipse says error, and i don't know what to do

                                Intent doBarcode = new Intent(parent, inputBarcode.class);
                                startActivity(doBarcode);

                            }else{
                                error.setText("Login gagal");
                                //Toast.makeText(getApplicationContext(), "Login Gagal", Toast.LENGTH_SHORT).show();
                            }

                        }catch (Exception e){
                            //error.setText(e.toString());
                            error.setText("Terjadi kesalahan, silahkan periksa koneksi internet anda");
                        }

                    }else{
                        //Toast.makeText(getApplicationContext(), "Otorisasi Gagal", Toast.LENGTH_SHORT).show();
                        status_npp = false;
                        status_password = false;
                        status_lokasi = false;
                        error.setText("Login gagal, silahkan periksa kembali");
                    }

                }
            });

        }
    }
</code></pre>

<p>Sorry for my bad english, i'm from Indonesia fyi :D</p>
