NullPointerException when returning to onActivityResult on some device
<p>Here is my code:</p>

<pre><code>Intent pictureActionIntent = new Intent(Intent.ACTION_GET_CONTENT, null);
                pictureActionIntent.setType("image/*");
                pictureActionIntent.putExtra("return-data", true);
                startActivityForResult(pictureActionIntent, GALLERY_PICTURE);
</code></pre>

<p>And:</p>

<pre><code>if (resultCode == RESULT_OK) {            
            if (requestCode == GALLERY_PICTURE)
            {
                Uri selectedImageUri = data.getData();

                selectedPath = getPath(selectedImageUri); And......
</code></pre>

<p>For most of the device, it is fine, the <code>data.getData()</code> will return something..<br>
But in Motorola, one device will have NullPointerException, and I checked that the <code>data.getData()</code> is null.<br>
Is there any solution to solve this problem??<br>
P.S. some other default application in this device can choose picture from gallery, so I assume there is some way to solve.  Please help...</p>
