hi !! I am working to find out a solution to use Intent to call camera
app and then call my custom function in overridden onActivityResult().
This code actually displays camera preview and return like i want it
to but no actual snap is taken by it. There is no new image added to
the gallery. :S
Button takePictureButton = (Button) this.findViewById
(R.id.camera);
takePictureButton.setOnClickListener(new View.OnClickListener
() {
public void onClick(View v) {
ContentValues values = new ContentValues();
values.put(Media.TITLE, "IMAGE");
values.put(Media.DISPLAY_NAME, "Image Captured by Camera");
Uri uri =
getContentResolver().insert(Media.EXTERNAL_CONTENT_URI,
values);
//Intent i = new Intent("android.media.action.action");
Intent i = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
i.putExtra("output", uri);
startActivityForResult(i, ACTIVITY_TAKE_PICTURE_WITH_INTENT);
This is my onActivityResult() code
@Override
protected void onActivityResult(int requestCode, int resultCode,
Intent data)
{
//super.onActivityResult(requestCode, resultCode, data);
if (requestCode == ACTIVITY_TAKE_PICTURE_WITH_INTENT) {
if (resultCode == RESULT_OK) {
///here i will call my function
Toast.makeText(temp1.this, "done !!",
Toast.LENGTH_SHORT).show();
}
}
}
Plz help me out what i am missing. I just used this code from a post
but being a newbie i have limited know how. so kindly explain with
suggestion.
Regards,
wahib
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en