Summary of reading and writing methods for files in the memory of Android phones
Summary of reading and writing methods for files in the memory of Android phones
This article describes how to read and write files in the memory of Android
Android provides the audiorecord and mediarecorder functions for recording. audiorecord is an audio stream that reads MIC data and can analyze stream data while recording; mediarecorder can directly store the MIC data to a file and encode the data (such as AMR and MP3 ).
First, add your application to the permission (whether you are using audiorecord or mediarecorder ):
Then, we will introduce the usage of the two separately.
《! -- Audiorecord --"
1.
Use ADB forword to communicate with Android mobile phones
The server code is as follows:
import java.io.IOException;import java.io.ObjectOutputStream;import java.net.Socket;import java.net.UnknownHostException;import java.util.Scanner;public class Server {public static final String TAG = "server";public static int PC_LOCAL_PORT = 22222;public static int PHONE_PORT = 22222;public static String ADB_PATH = "ad
from Google's successful experience. He said: "The Price of Ubuntu mobile phones is between $200 and $400, which is a mid-range product. Android was initially not designed and built for your personal computer. Although we started a little late, this has also become a huge advantage for us, so that we can have enough experience to learn from before doing a thing, and then firmly walk out of our own path."
and sends the message to the server, which is then encapsulated to send the messages to ClientSocket2.3. Realization of two mobile-phone communication clientsClient run ( Note: Here is an entire picture, which is an image ):The above-mentioned operation results in the communication of two Android machines. Two clients are assigned IDs 0 and 1, respectively. You need to specify the arrival party of the message when you send the message.3.1 Client Send
screen status broadcast receiver */private void startScreenBroadcastReceiver () {IntentFilter filter = new IntentFilter (); filter. addAction (Intent. ACTION_SCREEN_ON); filter. addAction (Intent. ACTION_SCREEN_OFF); filter. addAction (Intent. ACTION_USER_PRESENT); mContext. registerReceiver (mScreenReceiver, filter );}
Because the user can set whether the screen is locked after it is disabled, we cannot track the unlock event to determine its statu
1, too much cache dataEnter Settings--Program management (or applications)--all--find the problematic application, erase data, or cache. And then into the application.Note: Clearing the data will erase the application's personal settings, account information, and so on.
2. Too many running programsMobile background program too much memory, resulting in the application of the flash-back. Some mobile phones because of the hardware limit will be due to
Exercise caution when developing a UDP data transmission system between Android phones
TIPS:1. The communication between mobile UDP and a fixed IP is not a big problem, but it may also cause a slight packet loss. The problem cannot be found here. Do you think there are special considerations for UDP implementation at the android network layer.2. UDP communication
Explanation of automatic answering and hanging up for Android phones
1. Call up through aidl and reflectionThere are three steps:
(1) ITelephony. aidl. You must create a new com. android. internal. telephony package and put it into ITelephony. aidl file (after construction, there is ITelephony under gen. java file, whi
Recently did not want to take two mobile phones, then the old phone on the small call all transferred to the new phone. Can solve the problem of the old mobile phone function is too weak, there is no inconvenience with two mobile phones, although it is a little more to cut the telephone fee, use up or very convenient. But because the trumpet on its own phone is v
Android phones have long occupied the majority of the smartphone market, the Android system due to his open source and other open features will appear some technical problems, the following system home to tell you most of the Android phone troubleshooting solutions.one, unable to send short message reason analysis:1, t
X can be interpreted as hdpi according to the mobile phone screen standard, 480x320 is mdpi, and 320x240 is ldpi. According to the latest data, hdpi and mdpi of all Android mobile phones account for a ratio of more;
System Version, up to 2.1 ~ The proportion of 2.3 is also an absolute proportion. We can use this as the basis for adaptation. we need to pay attention to this data at any time, especially in
(1) Procedures
Android API's AudioManager provides a method to adjust the volume of mobile phones.
audioMa.adjustVolume(AudioManager.ADJUST_LOWER, 0);
audioMa.adjustVolume(AudioManager.ADJUST_RAISE, 0);You can also adjust the voice mode of your phone to vibrate or mute.
AudioMa. setRingerMode (AudioManager. RINGER_MODE_NORMAL );
AudioMa. setRingerMode (AudioManager. RINGER_MODE_SILENT );
AudioMa. setRinge
administrator privilege to successfully establish the proxy service. Therefore, you must use "Run as administrator" to start the command line window ".
Then verify the feasibility again. Go to System Management in Xiaomi 3 mobile phone> WLAN> "network details" of the connected network> proxy settings, enter the lan ip address of my computer and the HTTP Proxy port number provided by DeleGate.
The results are gratifying. The Google Play Store finally displays information normally and can downloa
New Features of Android 7.0 (nougat), android nougat
New Features of Android 7.0 (nougat)
Google officially introduced a large amount of information about Android 7.0 at the I/O conference. Currently, we know that the next-generat
Common Mistakes of new Android users and new android usersIn the past decade, as a senior mobile developer, we believe that the Android platform is the most well-known platform for beginners. It is not only a cheap tool, but also has a good development community, as well as
New Look, new purchase flow in Google Play
Http://android-developers.blogspot.com/2013_04_01_archive.html
Posted by purnima kochikar, director of business development, Games Applications
Today we announced thatNew version of the Google Play Store app is rolling out worldwide to Android
ArticleDirectory
10th class: Gui core system update
11.1 system UI changes
11.2 desktop update
There are many Android versions. in the traditional sense, a large number of device manufacturers are mainly Android 2.2/2.3, but now they need to switch to Android 4. version X. X system vendors and developers focus on the following:
1. Core Tec
Google has recently released the new Android version of 7.0 nougat (beef rolled sugar), believing that Android phone users will receive upgrades from Third-party handset makers in the coming months, whether you're a lucky person who has already downloaded upgrades, or who anxiously waits for updates,
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.