How to get the keys from ContentValues?
<p>My ContentValues object has string keys, and I would like to get a String[] result having all the keys in it?</p>

<p>How do I iterate a ContentValues object?</p>

<p><strong>EDIT 1</strong></p>

<p>After getting two responses I came up with this, do you see problems with it?</p>

<pre><code>        ArrayList&lt;String&gt; ar = new ArrayList&lt;String&gt;();
        ContentValues cv=data;
        Set&lt;Entry&lt;String, Object&gt;&gt; s=cv.valueSet();
        for (Entry&lt;String, Object&gt; entry : s) {
            ar.add(entry.getKey());
        }
        String[] projection=new String[ar.size()];
        ar.toArray(projection);
</code></pre>
