Course Content

If you are facing any issue in playing video please use Firefox browser.

Course Content


Creating Camera Application


In this video we are going to create Camera application in Android.

First of all we will design the layout of our application, for that we will open activity_main.xml file and imside that we will take one Relative Layout, Button, and an ImageView.

Now we will see the Java code of this application in file,

public class MainActivity extends Activity


private static final int CAMERA_REQUEST=1888;

ImageView imageView;

public void onCreate(Bundle savedInstanceState)





Button photoButton=(Button)this.findViewById(;



Intent cameraIntent=new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);

startActivityForResult(cameraIntent,CAMERA REQUEST);


protected void onActivityResult(int requestCode, int resultCode, Intent data)




Bitmap photo=(Bitmap)data.getExtras().get("data");


Now we will execute our code, and we need to run this application in a real device, not emulator. So for that we will connect one device and use it to run our code. As soon as we run our code, it executes properly. Camera captures image first and then show it's preview to us.


Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download The Apps

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
297K+ Downloads
App Download Section Circle 1
4.5 Rating
App Download Section Circle 2
10K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere