Do some debugging work...

The PackageManager can give you a list of all applications on your phone.
Step through them and find the Camera application and note the package name
of the camera application.

Assuming you have done that, you can do something similar to the following
(obviously putting in checks for the case the application doesn't exist,
etc...):

String packageName = <package name found in above steps>;
PackageManager mgr = getPackageManager();
Intent intent = mgr.getLaunchIntentForPackage(packageName);
startActivity(intent);

If the getLaunchIntentForPackage method returns null, as it sometimes does,
then you will have to create a new intent instead with something similar to
this:
Intent intent = new Intent();
intent.setClassName(packageName, className);

I have not looked into how to find the className of an arbitrary application
but I'm sure with a little work you can figure it out.

I have already explained to you how to do this, both in these forums and
when you emailed me directly.  Rather than continually posting the same
question over and over and waiting for someone to do your coding for you and
give you complete functional code, I would suggest looking through the
developer guide and the SDK reference docs and trying to figure it out for
yourself.

http://developer.android.com/reference/packages.html
http://developer.android.com/guide/index.html

Thanks,
Justin

----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------


On Thu, Oct 8, 2009 at 3:43 AM, wahib <wahib.t...@gmail.com> wrote:

>
> Hi !! I have a straightforward question. I just want to call and
> execute the built-in camera app i click button in my application.
> Being a newbie i have no idea how to code for it. plz share source
> code if anyone has done it.
>
> Regards,
> wahib
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to