I have encountered many problems when I am studying Android development these two days. Now I will record the mediarecorder () recording for my reference only ~~
Very convenient and simple ~~
Mediarecorder recorder = new mediarecorder (); // audio source mic recorder. setaudiosource (mediarecorder. audiosource. MIC); // content output format recorder. setoutputformat (mediarecorder. outputformat. three_gp
use of this, and then at the time of encoding using the I420bytes, the i420bytes by Xnv21bytes transformationprivate static void NV21toI420SemiPlanar(byte[] nv21bytes, byte[] i420bytes, int width, int height) { System.arraycopy(nv21bytes, 0, i420bytes, 0, width * height); for (int i = width * height; i We look at each time coding a frame into the mixer is what I do, the following code means to listen to the encoding of a frame before and after the state of the encoder changes and put the
, parameters can be judged by the camera's parameter, called as follows:[Java]View PlainCopy
Mcamera.getparameters (). getsupportedvideosizes ()
But sometimes even if the correct parameters are set, you may need to call the following method before you start:[Java]View PlainCopy
Mcamera.unlock ();
This method from the method name is unlocked camera estimation is afraid to use the device conflict, the specific reason for later to see the camera related API description.
Specific performance:
Call Mediarecorder's start () and stop () interval cannot be less than 1 seconds (sometimes more than 1 seconds), otherwise it will collapse.
Error message:
Java.lang.RuntimeException:stop failed.
At Android.media.MediaRecorder.stop (Native method)
Solution:
Call Setonerrorlistener (null) before stop; it's OK!
Related code:
/** Start recording/@Override public MediaPart Startrecord () {if (Mmediaobject!
Vitamio:Https://github.com/yixia/VitamioBundle/releasesHttps://github.com/yixia/VitamioBundle/archive/v4.2.2.zipVitamio Study Address:https://github.com/yixia/VitamioBundle/wiki/Getting-StartedThe total steps:One: Import vitamio_lib PackageTwo: Videoview in the XML layout to replaceThree: All the packages in the Java file are imported from Vitamio_lib.Four: In the Java file before the Setcontentview to add judgment!!! Public void onCreate (Bundle b) { super.oncreate (b); if (!io.vov.vita
Android Studio installation configuration, Environment setup detailed steps and basic use, android installation ConfigurationPreface
The installation, configuration, and usage of Android Studio are coming ~
Not to mention, the following describes how to install and configure
One, the supported features have text information interaction, voice chat, send files and recordingThe source code will be attached later.Second, the UI display diagramThree, after my test, is very successful. Just a little bit is the voice of real-time calls when the voice will echo or even panic. File transfer and text, recording are more successful.The software is the application of Java code, on the Android
There are two types of audio recording in Android: audiorecord and mediarecorder.
The former is suitable for real-time processing of audio data.
The latter is suitable for storing audio and video locally.
However, the latter seems to only store MPEG4, Amr, and 3GPP media formats. Why do they be saved to WAV format? It is best to have a ready-madeCode.
Of course, if you tell me to use audiorecord to retr
Recording the scroll position of ListView in android Development
This problem is not difficult, but it is not so easy to implement because the project requirements are too complicated. Search on the Internet and the results are as follows:
I don't know. who is the cZ operator? Http://www.bkjia.com/kf/ware/vc/ "target =" _ blank "class =" keylink "> vcHkgd2hvo7 + 3tNX9venJ3LXEy/keys + keys/Cw + a1xLLZ1/keys"
Android 2.3.7.r1 stops recording when you press the menu key. Change to video when pressing the menu key does not do processing, you can make the following modifications:
In Packages/apps/cameraopen/src/com/mediatek/camera/videocamera.java
In the OnKeyDown () method:
Modify
Copy Code code as follows:
Case Keyevent.keycode_menu:
if (mheadupdisplay!= null Mglroo Tview!= null
!malerts
http://www.android-studio.org/Http://android-studio.org/index.php/docs/guideRecently to touch Android programming, originally wanted to install eclipse, accidentally found Android specifically developed tools Android Studio, intended to install the trialhttp://www.android-st
The two days Google updated the official version of Android Studio 1.2, the new version of the settings interface big change, the set of entries are older versions of the collation, not as before the list of long.
Take advantage of the opportunity to install a new version, record the common settings, and put them in the blog to make a memo.
DownloadThe official version of the
First, Introduction
Android Studio is Google's newly released Android application development environment, and Android Studio is based on IntelliJ idea development. In the Android Studio
1. PrefaceIn the previous article we introduced the basic process of building an ArcGIS Runtime SDK for Android development environment based on Android Studio, in which we used the Gradle-based approach to build, in this way primarily by setting up the MAVEN warehouse location , set compilation options, dependent versions to download the corresponding SDK depend
This example introduces the detailed steps for Android studio to create the first app for your reference, as follows
1. Create HelloWorld Project
The first program written in any programming language will undoubtedly be Hello world, a tradition that has been handed down since the the 1970s and has become a timeless classic in the programming world, so today it's time to use
[Android learning notes] Android Studio development environment under Mac, android learning notes
For mobile terminals, I have been developing iOS for the past, and I have never used Java. However, it entered the finals of the Google Android national mobile Internet innovati
[Android] [Android Studio] *. jar and *. aar generation and *. aar import project method, android. aarThis section describes how to generate an aar file in Android Studio and use the aar file locally. *. Jar and *. aar files are g
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.