For example, to get the name of the application that opens the camera, just add the following code to the open () method in Frameworks/base/core/android/hardware/camera.java.
Copy Code code as follows:
Application application =
The technology involved with Android threads is: Handler; message; MessageQueue; Looper; Handlerthread.
Here's a section of code that updates the UI in a thread:
Copy Code code as follows:
public class Mainactivity extends activity {
Service as the four components worthy of our more attention
In Android, the activity is primarily responsible for the presentation of the front page, and the service is primarily responsible for tasks that require long-term operation. For example,
Android version of the replacement, the new version brings new features, new methods.
The new approach brings many conveniences, but it cannot run on a lower version of the system, and if the compatibility is not handled properly, the app will be
1, dialog box notification (Dialog Notification)
When your application needs to display a progress bar or require the user to confirm the information, you can use the dialog box to complete it.
The following code opens a dialog box as shown in the
Common data conversion methods for Android and MCU communication
1. Convert GB2312 into Chinese, such as bafac2dcb2b7→ carrots, two bytes to synthesize a text
public static string STRINGTOGBK (String string) throws Exception {
byte[]
Objective
In Android applications, there are often scenes that need to be used to store pictures on the device, and it's very inconvenient to get directly from the path. So it is generally recommended to call the gallery application of the system,
Sometimes, when we write our own application, we need to implement the specified APK by code, install the specified topic, or install a new apk. You can do this in the following ways:
Copy Code code as follows:
private void installapk
In project development, we often need to add components dynamically, which can be added in two parts: layout and component
Among them, the added layout mainly has the Relativelayout type (relative layout) and LinearLayout (linear layout)
The
Nearly three months did not write a blog, because of work transfer, a lot of experience, ideas have no time to record down. Now the time is a little abundance, I will try my best to take the time to make up the things I want to write without writing.
Copy Code code as follows:
Package com.leeass.generate;
Import Java.io.File;Import Java.io.FileFilter;Import java.io.FileNotFoundException;
/*** For the Cocos2d-x engine, the Android project compiled file list generation* @author
First, the operation of the canvas
A series of operations on canvas refers to the operation of rotating, translating and scaling canvas.
These operations make it easier for canvas objects to be used.
Second, canvas translation
/**
*
Objective
In fact, think carefully about the principle is quite simple. It's just when we slide to the last page and then slide backwards to the first page, and when we slide to the first page and slide forward, we navigate to the last page.
Recently to help Friends do an animated menu, feel a certain practical value, here to share with you, first look at the effect:
Realize the idea:
As you can see from the diagram, these three (or more, need to realize) the menu revolves around
This article is about the Android custom view of the random generation of image verification code, development, we will often need to generate a random image verification code, but this is second, the main still want to summarize some of the custom
Objective
As you all know, Android Studio has now been updated to 2.0 Preview 6, and Google's highly prized development tool has incomparable advantages over eclipse ADT. However, in the actual use, there are still a lot of uncomfortable places.
Under the WebView of Android
HTML5 's video settings AutoPlay properties
Or use the Play method in document ready
Can't make it play automatically
This problem can only be resolved using the WebView onpagefinished method, as follows:
(1). Resolve one of the object:
Copy Code code as follows:
{"url": "Http://www.cnblogs.com/qianxudetianxia"}
Parsing method:
Copy Code code as follows:
Jsonobject Demojson = new Jsonobject (jsonstring);
String url =
In the previous article to introduce the Android QQ login interface encountered problems and solutions, this article continues to introduce you to the Android QQ interface knowledge.
First to show you the effect of the picture:
Problem:
1. Drop
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.