As long as you remember the following principles, the OOM problem for processing images in Android is absolutely easy:
1. Large images must be compressed in proportion before they are displayed. to exit the current activity, they must be recycled.
From: http://www.cnblogs.com/mcodec/articles/2122675.html
There are two audio output modes in Android, one is to use the audiotrack class output on the Java layer. However, the audio is decoded at the JNI layer. If the audio is sent back to the
In the workspace. Java class implementation, the related methods include:1) computescroll (): overwrites computescroll () of the parent class. The main function is to calculate the displacement of the drag, update the background, and set the screen
During normal development, we may sometimes need some global data to make all the activities and views in the application accessible. In this case, you may first want to define a class and then create many static members. However, Android has
Android: inputtype parameter type description
Android: inputtype = "NONE" -- enter common characters
Android: inputtype = "text" -- enter common characters
Android: inputtype = "textcapcharacters" -- enter common characters
Android: inputtype =
Alas, in order to make it easier after Android 2.2, it took nearly two months to complete the porting of the previous project on Android 1.5. Although the Development Board and system version of the new project have been changed, but the opencore
Public class mainactivity extends activity implements onclicklistener {Private Static final file = new file (environment. getexternalstoragedirectory () + "/dcim/camera"); // obtain the external storage directoryPrivate file mfile; // save the
The memory of the android application is limited to 16 MB, at least on the G1 mobile phone. For a mobile phone, this has occupied a lot of memory, but it is very small for developers to achieve the goal. In real time, you didn't intend to use all
Backoff Algorithms are common in Android applications. The core objective is to save resources and reduce power consumption:1. Heartbeat package of the game;
After a heartbeat packet is sent, the next heartbeat packet is processed by the backoff
My first map program was written in Android SDK 1.0. At that time, apikey was just released. At that time, I applied for a map resource on the simulator and mobile phone, as a result, when I switched to Android SDK 1.5, I could run it on my mobile
3. Android simulator tools
(1) ADB:
ADB (Android debug Bridge) is a common debugging tool provided by Android. With this tool, we can manage the status of devices or mobile phone simulators and perform the following operations:
A. quickly update the
The previous article analyzes the classic instances of JNI. This article describes how to easily learn JNI data types through examples. All languages have their basic data types. To learn more, you must understand the most basic things. In JNI, we
1. java. Lang. illegalstateexception: the specified child already has a parent. You must call removeview () on the child's parent first.
Recently, the browser that comes with Android is coming to an end. When debugging is run, the preceding
I haven't written a blog for a long time. Today, I will share with you the integrated development environment for Android applications.The previously used SDK cannot be updated to 4.1, because the new SDK configuration is always incorrect, and the
Recently, I am working on a weather forecast widget that uses APIs provided by Google to query weather conditions all over the world. This article mainly describes how to obtain the latitude and longitude of a city using Android JSON. The program is
Solve an interesting problem today
Problem description: assume that an application contains two activities A and B. Open a and press home to return to mainhome, in the Framework, the mainhome is rolled back to open mainhome through startactivity
The video recording function is coming. There are related classes in androidsdk: Android. media. mediarecorder, of course, cannot be implemented during learning because the simulator does not provide necessary hardware facilities. Media can play
You can implement the tab effect in Android by referencing tabhost in the layout file, obtaining the tabhost instance by ID in the activity, or directly inheriting tabactivity, directly obtain the tabhost instance.
The main code of the program is as
Problem Background: our game project needs to be transplanted to a channel. This channel has its own billing and login method, providing us with an android SDK project, which only contains res, SRC is a jar package.
Idea: Use the Eclipse project to
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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service