provided by the Android operating system.Message msg = updateBarHandler. obtainMessage ();// Set the arg1 parameter value of the msg object to I and use the two member variables arg1 and arg2 to transmit messages. The advantage is that the system performance consumption is low.Msg. arg1 = I;Bundle bundle = new Bundle ();Bundle. putString ("test", "test bundle ");Msg. setData (bundle );Try {// Set the current display to sleep for
Nowadays, many mobile apps may embed a web page directly. Benefits: one is convenient feature updates and easy maintenance. You only need to maintain the page of the server without updating the client. The other is universal functionality, not only available for android, ios can also be used, and symbian can also be used directly. In addition, WebView has strong support for Javascript, but it has not been tested by programming. Here is an example to i
started with Android development, but it will also involve some other elements that already exist in the application structure. In today's article, we will not discuss these additional elements in depth. All in all, learning about the basic creation knowledge of Android applications is the teaching task we need to complete today.
1. Source
Step
Introduced
Build Android's development environment and write a simple sample program
Build Android development environment under Windows
Directory structure description of Android project
Write a simple Hello world program
First, build the Android development environment under Windows
1. Install JDK (Java Develop
By default, the sampling rate of Android sound is fixed to 44.1 kHz, and the recording sampling rate is fixed to 8 kHz, therefore, the underlying audio device drivers only need to set these two fixed sampling rates. If the sampling rate transmitted from the upper layer does not match the sampling rate, the android framework layer performs resample processing on the audio stream.
The resample process is as f
Android custom control development (1)
As a creative developer or software with high requirements for uidesign, you will often encounter situations where the control provided by Android cannot meet your needs, we can only implement controls suitable for projects on our own. In addition, Android allows you to inherit ex
I. Windows:The following software must be installed in a Windows development environment:
Java JDK
Apache ANT Build System
Android SDK
Cygwin
Android NDK
Eclipse IDE
1. install Java JDK
Configure environment variables:Create a JAVA_HOME key with the value set to the JDK installation directory.
Open the PATH key and add
; % JAVA_HOME % \ bin
Detection:
Javac-versi
displayed in the status barPolicy. tickerText = "Wukong has helped the master ";// Send a notificationYymanager. Y (NOTIFYCATION_ID, notify );Break;Case R. id. bajie:// Same as aboveOptional Y. icon = R. drawable. bajie;Notify. setLatestEventInfo (icationicationdemo. this, "eight rings ","Notice on saving the master", pi );Policy. tickerText = "eight rings to save the master ";Yymanager. Y (NOTIFYCATION_ID, notify );Break;Case R. id. shaseng:// Same as aboveOptional Y. icon = R. drawable. shase
Android learning Activity (1) activity and intent, androidintent
Tool: JDK environment configuration + SDK + ADT Tool
I. Main Functions of Activity:
1. interfaces between users and Applications
2. Control container
II. Key points for creating an Activity: (in the directory of src)
1. An Activity is a class that inherit
The first thing to do is to build the environment and then create a simple HelloWorld . The topics in this article are as follows:
1, Environment Construction 1.1, JDK installation 1.2 Eclipse installation 1.3 Android SDK installation 1.4, ADT installation 1.5, create AVD 2, HelloWorld
1 Environment Build 1.1, JDK install Java and configure env
on the right ).
Note: If you are looking for information about the context operation bar, see the "menu" guide.
Add operation bar
From android3.0 (API level 11), the Operation bar is included in all theme usage. when the targetsdkversion or minsdkversion attribute is set to "11" or a greater value in the activity of the hole topic (or its subclass), this topic is the default Topic 1. For example:
Android:
I. OverviewI am used to network programming in Linux. I have been wondering how to get the IP address of my mobile phone before I use a smartphone ). Okay, I know that Android is based on the Linux kernel. Can I use the network programming method in Linux I learned to get the IP address? In fact, this is a relatively low-level method. on Android, Java APIs can be fully used for implementation, and the imple
Features OverviewThe init process is the first process launched by the Android kernel, with a process number (PID) of 1, which is the ancestor of all the processes in the Android system, so it is shouldering the important responsibility of system startup. The init source code for Android is located in the system/core/i
(); Implements Runnable { void Run () { while (! Thread.CurrentThread (). isinterrupted ()) { Testhandler.Above method Demo View: http://rayleung.javaeye.com/blog/411860Method Three: (Java habits.) Android platform, this does not work, which is related to the thread safety of Android)In the
Android custom ViewPager (1) -- custom Scroller to simulate the animation process
I believe that the ViewPager component provided by the Android SDK is quite familiar to everyone, but ViewPager exists in support. in the v4 package, ViewPager does not exist in earlier android versions. How can we use sliding effects si
handle some of their own specific events when the event is ticked. As shown in the following:The hook's ability to "fit" its code into the process of a hooked program becomes a part of the target process. We also know that in the Android system using the sandbox mechanism, the ordinary user program process space is independent, the program runs between each other undisturbed.This allows us to hope that the idea of changing certain behaviors of other
, it should be good to use it on Linux and Mac.
1. Download and install
Go to http://developer.android.com/sdk/installing/studio.htmlto download the installation package (DMG file), open and drag Android studio to applications. After copying the package, you can drag the icon under the application to the dock.
2. Create a project
After the installation is complete, select the default option and click OK
.
It's great to support the Gradle Automation build tool, but it will take some time to learn and adapt to the developers who have just moved from the Eclipse platform.
second, the preparation of software:1.JDKjdk:http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.htmlDownload installation of JDK and environment variable configuration video tutorial: http://pan.baidu.com/s/1ntwzlm5 Password: yo4f2.
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.