title: Bulk inserting using an array of ContentValues
body: <p>im trying to do a batch insert of about 700 floats. The method i'm using is below and as well as the content provider's bulkInsert. The issue is that when i put all the floating point values into the ContentValues nothing happens. What's a better way to insert those floating point values into the ContentValues object?</p>
  
  <pre><code>    private void saveToDatabase( float[] tempValues )
      {
      ContentValues values = new ContentValues();
  
      // WM: TODO: add patient id and sensor type
      for (float tempVal : tempValues){
          values.put( DataTable.COLUMN_DATA, tempVal );
      }
  
      ContentValues[] cvArray = new ContentValues[1];
      cvArray[0] = values;
  
      ContentResolver resolver = getContentResolver();
      resolver.bulkInsert( HealthDevContentProvider.CONTENT_URI_DATA, cvArray);
  
      public int bulkInsert(Uri uri, ContentValues[] values){
      int numInserted = 0;
      String table = null;
  
      int uriType = sURIMatcher.match(uri);
  
      switch (uriType) {
      case RAWINPUT_TABLE:
          table = RAWINPUT_TABLE_PATH;
          break;
      }
  
      db.beginTransaction();
      try {
          for (ContentValues cv : values) {
              long newID = db.insertOrThrow(table, null, cv);
              if (newID &lt;= 0) {
                  throw new SQLException("Failed to insert row into " + uri);
              }
          }
          db.setTransactionSuccessful();
          getContext().getContentResolver().notifyChange(uri, null);
          numInserted = values.length;
      } finally {         
          db.endTransaction();
      }
      return numInserted;
  }
  </code></pre>