android - camera activity does not return back to it's parent activity -


i'm trying open android camera, , when press ok camera activity should return parent activity" 1 started camera activity"

but happens is, when press ok, camera activity remains on screen , not return parent activity.

code:

    private string retrievepath() {     int []x = imgophlpr.getids();     string s = imgophlpr.getimg_path(x.length);     return s;        } 

code:

private static final int requestcode = 0; onclicklistener btn_takepicturelistener = new onclicklistener() {      @override     public void onclick(view v) {         // todo auto-generated method stub         intent intent = new intent(mediastore.action_image_capture);         string imgpath = retrievepath();         intent.putextra(mediastore.extra_output, getimageuri(imgpath));         startactivityforresult(intent, requestcode);     } }; @override protected void onactivityresult(int requestcode, int resultcode, intent data) {     //super.onactivityresult(requestcode, resultcode, data);      if (requestcode == requestcode && resultcode == result_ok) {        //string s = data.getdata().tostring();        //toast.maketext(getbasecontext(), ""+s, toast.length_short).show();         toast.maketext(getbasecontext(), "picture taken", toast.length_short).show();     }            } 

the emulator not provide camera support. refer http://code.google.com/p/android/issues/detail?id=14545 . check in device.

check

if (resultcode == result_ok) {             if (data.getextras().get("data") != null) {                 bitmap photo = bitmap.createscaledbitmap((bitmap) data.getextras().get("data"), 90, 90, false);                if(photo != null){                    log.d("photo","photo not null"); } 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -