Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Open native Camera app within another app?

Open native Camera app within another app?

Basic Tutorials concerning: GUI, Views, Activites, XML, Layouts, Intents, ...

Open native Camera app within another app?

Postby sm12 » Fri Jan 16, 2009 9:42 pm

Hello,

Is it possible to call "Camera" app from another application and retrieve a picture?

What I want to do is open android's native camera app within my app and retrieve a picture to further usage in my application, instead of creating my own camera application.

Any ways to do that?

Thanks.
sm12
Freshman
Freshman
 
Posts: 7
Joined: Thu Nov 13, 2008 4:36 am

Top

Postby sm12 » Sat Jan 17, 2009 4:28 pm

There is a way actually to do it with intent and startActivityForResult:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  2.   if(requestCode == CAPTURE_IMAGE) {
  3.      if(resultCode == RESULT_CANCELLED)
  4.           // do smth
  5.      if(resultCode == RESULT_OK)
  6.           // do smth
  7.   }
  8. }
  9.  
Parsed in 0.012 seconds, using GeSHi 1.0.8.4


Is "resultCode == RESULT_OK" contains my captured image?
Can I directly save it?

And what is the intent to call the camera app to retrieve an image?

Thanks
sm12
Freshman
Freshman
 
Posts: 7
Joined: Thu Nov 13, 2008 4:36 am

Top

Return to Novice Tutorials

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests