title: Intent an activity
body: <p>I am trying to call an activity from lisview but when i call intent my app crash i am trying with a bla activity but crash too, my listview is inside a tabwidget can somebody helpme plese.</p>
  
  <p>this is my code.</p>
  
  <pre><code>                        lstResumen.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                              @Override
                              public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
  
                                  try {
  
                                      //Obtiene el cursor asignado a este listview
                                      Cursor Cursor_Resumen = (Cursor) parent.getItemAtPosition(position);
                                      //Llena las variables con los valores correspondientes
                                      Global.Parametro1 = Cursor_Resumen.getString(Cursor_Resumen.getColumnIndexOrThrow("_id"));
                                      Global.Parametro2 = Cursor_Resumen.getString(Cursor_Resumen.getColumnIndexOrThrow("id_precio"));
                                      //I02.9622.157
                                      Cursor_Resumen.close();
  
                                      int Cantidad_Fichas = 0;
                                      String SWhere = "";
                                      SWhere = "id_producto=?";
  
                                      //Verifica si ya se ingreso ficha para este producto si no se ha ingresado llama el activity de fichas
                                      margs = new String[]{Global.Parametro1};
                                      Cantidad_Fichas = manager.Consulta_Campo_Int("ifnull(count(*),0) AS cuantos", "cuantos", SWhere, "fichas", margs);
  
                                      if (Cantidad_Fichas == 0) {
  
                                          try {
  
                                              Intent intent = new Intent(view.getContext(), Serie.class);
                                              view.getContext().startActivity(intent);
  
  
                                          } catch (Exception e) {
                                              message = e.getMessage();
                                              Toast.makeText(getBaseContext(), message, Toast.LENGTH_LONG).show();
                                          }
  
                                      } else {
                                          Toast.makeText(getBaseContext(), "Esta ficha ya fue ingresada", Toast.LENGTH_LONG).show();
                                          return;
                                      }
  
                                  } catch (Exception e) {
                                      message = e.getMessage();
                                      Toast.makeText(getBaseContext(), message, Toast.LENGTH_LONG).show();
                                  }
  
                              }
  
                          });
  </code></pre>
  
  <hr>
  
  <pre><code>E/AndroidRuntime: FATAL EXCEPTION: main
                    Process: com.creceactivaciones.itecandroidice.app, PID: 11065
                    java.lang.RuntimeException: Unable to resume activity {com.creceactivaciones.itecandroidice.app/com.creceactivaciones.itecandroidice.app.Serie}: java.lang.IllegalArgumentException: the bind value at index 5 is null
                        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2964)
                        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2993)
                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395)
                        at android.app.ActivityThread.access$800(ActivityThread.java:151)
                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
                        at android.os.Handler.dispatchMessage(Handler.java:110)
                        at android.os.Looper.loop(Looper.java:193)
                        at android.app.ActivityThread.main(ActivityThread.java:5299)
                        at java.lang.reflect.Method.invokeNative(Native Method)
                        at java.lang.reflect.Method.invoke(Method.java:515)
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829)
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645)
                        at dalvik.system.NativeStart.main(Native Method)
                     Caused by: java.lang.IllegalArgumentException: the bind value at index 5 is null
                        at android.database.sqlite.SQLiteProgram.bindString(SQLiteProgram.java:164)
                        at android.database.sqlite.SQLiteProgram.bindAllArgsAsStrings(SQLiteProgram.java:200)
                        at android.database.sqlite.SQLiteDirectCursorDriver.query(SQLiteDirectCursorDriver.java:47)
                        at android.database.sqlite.SQLiteDatabase.rawQueryWithFactory(SQLiteDatabase.java:1339)
                        at android.database.sqlite.SQLiteDatabase.rawQuery(SQLiteDatabase.java:1278)
                        at com.creceactivaciones.itecandroidice.app.dbManager.Series_Promotores(dbManager.java:1231)
                        at com.creceactivaciones.itecandroidice.app.Serie.onResume(Serie.java:127)
                        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1197)
                        at android.app.Activity.performResume(Activity.java:5343)
                        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2950)
                        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2993) 
                        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2395) 
                        at android.app.ActivityThread.access$800(ActivityThread.java:151) 
                        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) 
                        at android.os.Handler.dispatchMessage(Handler.java:110) 
                        at android.os.Looper.loop(Looper.java:193) 
                        at android.app.ActivityThread.main(ActivityThread.java:5299) 
                        at java.lang.reflect.Method.invokeNative(Native Method) 
                        at java.lang.reflect.Method.invoke(Method.java:515) 
                        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:829) 
                        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:645) 
                        at dalvik.system.NativeStart.main(Native Method) 
  </code></pre>