OnActionResult method is not called in Android
<p>I want to choose images from the Gallery. Please check the following code.</p>

<pre><code>public class Camera extends Activity {


     private static final int SELECT_PICTURE = 1;
     private String selectedImagePath;
     WebView localview;

    @Override
    public void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
    }

    public void ChoosePhoto(WebView webview)
    {
                localview=webview;
            Intent intent = new Intent();
                intent.setType("image/*");
                intent.setAction(Intent.ACTION_GET_CONTENT);
                startActivityForResult(Intent.createChooser(intent,"Select Picture"), SELECT_PICTURE); 
    }   

    public void onActivityResult(int requestCode, int resultCode, Intent data)
    {
        if (resultCode == RESULT_OK) {
            if (requestCode == SELECT_PICTURE)
            {
                Uri selectedImageUri = data.getData();
                selectedImagePath = getPath(selectedImageUri);
                try {
                    FileInputStream fileis=new FileInputStream(selectedImagePath);
                    BufferedInputStream bufferedstream=new BufferedInputStream(fileis);
                    byte[] bMapArray= new byte[bufferedstream.available()];
                    bufferedstream.read(bMapArray);
                    localview.loadUrl("javascript:ReceivePhoto(\""+bMapArray+"\")");
                    if (fileis != null) 
                    {
                        fileis.close();
                    }
                    if (bufferedstream != null) 
                    {
                        bufferedstream.close();
                    }
                } catch (FileNotFoundException e) {                 
                    e.printStackTrace();
                } catch (IOException e) {                   
                    e.printStackTrace();
                }               
            }
        }
    }

    public String getPath(Uri uri) {
        String[] projection = { MediaStore.Images.Media.DATA };
        Cursor cursor = managedQuery(uri, projection, null, null, null);
        int column_index = cursor
                .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
        cursor.moveToFirst();
        return cursor.getString(column_index);
    }

}
</code></pre>

<p>And included the activity in Manifest file. But after choosing the image, <strong>OnActivityResult is not called.</strong></p>

<p>Can anyone please help me???</p>
