bug in the function
<p>I Do function, going over lines Cursor these lines and trying to add to the array, get a custom error for statement  <code>arr_date[i]=String.valueOf(str);</code></p>

<pre><code>private String[] logCursor(Cursor c) {
    // TODO Auto-generated method stub
    final String Tag="States";
    String[] arr_date  = new String[] {};

    if (c!=null) {
        if (c.moveToFirst()) {

            String str;
            int i=-1;
            do {

                str="";
                i=i+1;
                for (String cn: c.getColumnNames()) {
                    str = str.concat(c.getString(c.getColumnIndex(cn)));
                }
                Log.d(Tag, str);
                arr_date[i]=String.valueOf(str);
            } while (c.moveToNext());

        }
    }

    return arr_date;

}
</code></pre>
