Method One:
1. Win+q the search application interface to find the camera;
2. Select the camera option at the bottom of the screen and choose "More";
3. More options in the flashing frequency of the default is 60HZ, adjusted to 50HZ after the ripple disappeared.
Method Two:
1. If installed QQ, can be adjusted in the QQ video settings, chat window open "video settings"
recently do the Avatar upload function need to use the system album, Camera , in the call System album, the camera found in the English system Photo album interface after the title display "Photos", but the phone language has been set to display Chinese, tangled half a day,
// System album request code Private Static int - ; // System Camera Request code Private Static int 101;Photo Photo Save AddressPrivate final static String Header_path = Environment.getexternalstoragedirectory () + File.separator + "header.jpg";// Enter System album New Intent (intent
Call the camera to take a picture of the request codepublic static final int request_take_photo_code = 1;public static final int request_take_photo_code2 = 2;ImageView to show pictures after taking pictures private void StartTakePhoto2 () {Booting the system cameraIntent Intent = new Intent (mediastore.action_image_capture);Start activity and get return dataStartactivityforresult (Intent, REQUEST_TAKE_PHOT
Getting started with Network Camera-sorting and summarizing the transplantation work:
1. Burn the firmware. There can be many writing methods. The most primitive one is to use fewer simulators, that is, to directly write flash with the simulators provided by chip manufacturers, as a system transplant, it is unnecessary or irrelevant to this burning mode. As a convenience for post-migration and maintenance,
directly saved in the System album location???????????????????
File File = new file ("/sdcard/myimage/");
File.mkdirs (); //Create a folder
String fileName = "/sdcard/myimage/" +name;
try {
b = new FileOutputStream (FileName);
Bitmap.compress (Bitmap.CompressFormat.JPEG, N, b); Writing data to a file
} catch (FileNotFoundException e) {
E.printstacktrace ();
} finally {
try {
B.flush ();
B.close ();
} catch (IOExcept
To solve the problem that the system camera program is called through Intent and the image returned is too small, intent calls
Intent it = newIntent("android.media.action.IMAGE_CAPTURE");startActivityForResult(it, Activity.DEFAULT_KEYS_DIALER);
After you press the photo key, your activity will be returned. Therefore, you must add a processing method to the onActivityResult method,
protectedvoidonActivityRes
Key ideas:
Initialize components;
Create and start the photo intent;
Use the onactivityresult () callback function to process images.
Key code:
Initialize components:
takePicBtn = (Button) findViewById(R.id.buttonPicture);takePicBtn.setOnClickListener(takePiClickListener);takeVideoBtn = (Button) findViewById(R.id.buttonVideo);takeVideoBtn.setOnClickListener(takeVideoClickListener);
Create and start the photo intent:
Intent intent = new intent (mediastore. action_image_capture );
Startactivityf
((Environment.getexternalstoragestate (). Equals (environment.media_mounted))) {Select your Own folderString path = Environment.getexternalstoragedirectory (). GetPath () + "/myvideo/";Constants.video_url is a constant that represents the folder where the video is storedFile Mediastoragedir = new file (path);if (!mediastoragedir.exists ()) {if (!mediastoragedir.mkdirs ()) {LOG.E ("TAG", "Folder creation failed");return null;}}The file is named according to the current number of millisecondsStri
1, Technical introduction
(1) The Avfoundation.framework framework provides a avcapturesession class. Use it to achieve the video capture function.(2) using Avcapturevideopreviewlayer, the camera can be photographed in real-time display on the Viewcontroller.(3) for captured video, we use Avcapturemoviefileoutput to output it to the file.
2, the following implementation of a video function
(1) Click the "Start" button to start recording the video.
Reposted from hi_android: The final editor hi_android
The following code calls the system photo program,
12
Intent it = newintent ("android. Media. Action. image_capture ");Startactivityforresult (it, activity. default_keys_dialer );
After you press the photo key, your activity will be returned. Therefore, you must add a processing method to the onactivityresult method,
The following code calls the system photo program,
12
Intent it = newintent ("android. Media. Action. image_capture ");Startactivityforresult (it, activity. default_keys_dialer );
After you press the photo key, your activity will be returned. Therefore, you must add a processing method to the onactivityresult method,
12345678910111213
Protectedvoidonactivityresult (intrequestcode, intresultcode, intent data ){Super. onac
System camera call method:
Step 1:
Intent bycamera = new intent ("android. Media. Action. image_capture"); bycamera. putextra (mediastore. extra_output, Uri. fromfile (yourfilepath); startactivityforresult (bycamera, 0 );
Step 2:
Obtain the returned data in the onactivityresult (INT, Int, intent) method of the current activity.
Protected void onactivityresult (INT requestcode, int resultcode, i
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.