Re: [android-beginners] Re: how to call a function after taking snap from camera?? plz help

2009-11-10 Thread wahib haq
hi Chris !! Its after a long time i am responding to your suggestion
:S. I was out of this task for a while. I tried your suggestion that
to use StartActivityForResult and then calling mufunction() in an
override of onActivityResult(). But its not working and being a newbie
its tough to find the cause very quickly.

I tried like this ..

Intent intent = new Intent();
intent.setClassName(com.android.camera,
com.android.camera.Camera);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//startActivity(intent);

startActivityForResult(intent,0);

 @Override
protected void onActivityResult(int requestCode, int
resultCode,Intent data)
{


super.onActivityResult(requestCode, resultCode, data);

decode(); //function which i want to call

}

I searched for few examples using onActivityResult() and i found that
it used requestCode with Switch in most of them. I am confused what to
pass with Intent(intentobject, ?) and what would i receive in
requestCode variable ??

Remember i intend to take a snap from camera app and want to execute
decode() function.

Kindly help.

Regards,

-- 
Wahib-ul-haq

Communications Engineering Student,
NUST, Pakistan.
www.sizzlotech.com

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: how to call a function after taking snap from camera?? plz help

2009-10-15 Thread Chris

Have you tried using StartActivityForResult then calling the myfunction
() in an override of onActivityResult?

Chris.

On Oct 15, 1:58 am, wahib wahib.t...@gmail.com wrote:
 Hi!! I am stuck with this issue. When i press a button in my custom
 app the built-in camera app executes but after taking snap i want to
 run my code on the image taken but the camera preview doesnt
 vanishes:S I just want to exit the preview and run my code. Being a
 newbie i am really confused how to do it.

 This is the code in onclick() function for button -

 Intent intent = new Intent();
 intent.setClassName
 (com.android.camera,                com.android.camera.Camera);
                                 
 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 startActivity(intent);

 myfunction() ;   ///what i want to call
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---



[android-beginners] Re: how to call a function after taking snap from camera?? plz help

2009-10-15 Thread jbrohan

try http://code.google.com/p/android-playground-erdao/wiki/SnapFace
This is how I got my project like yours going. Basically there is a
callback after the picture is taken.
John

On Oct 14, 8:58 pm, wahib wahib.t...@gmail.com wrote:
 Hi!! I am stuck with this issue. When i press a button in my custom
 app the built-in camera app executes but after taking snap i want to
 run my code on the image taken but the camera preview doesnt
 vanishes:S I just want to exit the preview and run my code. Being a
 newbie i am really confused how to do it.

 This is the code in onclick() function for button -

 Intent intent = new Intent();
 intent.setClassName
 (com.android.camera,                com.android.camera.Camera);
                                 
 intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 startActivity(intent);

 myfunction() ;   ///what i want to call
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~--~~~~--~~--~--~---