Android for a long time. The following is a collection of Android interview questions:
===========================================================
1. What are some of the intent's ways of activating activity, do you know each meaning?
Here Android123 hint everybody, intent some mark has Flag_activity_brought_to_front, Flag_activity_clear_top, Flag_activity_clear_when_ Task_reset, Flag_activity_exclude_from_recents, Flag_activity_multiple_task and Flag_activity_new_task. Each of the meanings you see in the SDK documentation and specifically run down so your memory will be more profound.
2. What are the starting modes of activity and task? What is the meaning of each?
For android:launchmode definitions in Androidmanifest.xml, there are standard, singletop, Singletask, and SingleInstance, as well as Android: Taskaffinity These issues, you should also understand that the Android development network in the previous article, but many developers are still not very clear, these basic issues we will continue to summarize.
About the starting mode of activity, reference: http://blog.csdn.net/feng88724/archive/2011/05/11/6412638.aspx
3. What are the methods for passing some binary data through intent?
1. Use the Serializable interface to implement serialization, which is a common Java method.
2. Implement the Parcelable interface, where some of the Android classes such as the bitmap class have been implemented, and parcelable the exchange of data in the Android Aidl is also common.
4. Can you say the entry point of Android application?
The real Android entry point is application Main, and you can look at the Androidmanifest.xml's inclusion relationship. You can have no activity, but you have to application.
5. What are the XML parsers in Android that are proficient?
Here Xmlpull, sax and Dom believe that web development has been done.
6. Does SQLite support business? How does adding deletes improve performance?
SQLite, as a lightweight database, is smaller than MySQL, but supports SQL statement queries and improves performance by considering the original optimized SQL query statement.
7. Are you proficient in Android service and binder, Aidl?
As an important background service for Android, these should be mastered by every Android developer, and this is the biggest difference from Java SE, where you can view the Android music player source code music.git, which is no longer detailed here.
8. Which Android phone did you use, what are the advantages and disadvantages, and what are the pros and cons of the iphone or Symbian?
This as a face test is also under review, you can probably understand its understanding of Android, more mobile development awareness.
===================================================================================
1. Please describe the life cycle of the activity below.
Create OnCreate-start onstart– restore onresume– suspend onpause– end onend– destroy OnDestroy
2. If the activity in the background is reclaimed by the system for some reason, how to save the current state before being reclaimed by the system.
Save the data in the Suspend OnPause state.
3. How to set an activity as a window style.
Set theme.
4. How to quit the activity. How to safely exit application that have invoked multiple activity.
5. Please describe the five types of layouts that are commonly used in Android.
Linear layout linearlayout, relative layout relativelayout
Form Layout tablelayout,
Absolute layout abslayout (OBSOLETE)
Frame Layout Framelayout
6. Please introduce the data storage mode of Android.
Preference, file, database SQLite, networked storage
7. Please describe how the next contentprovider is to achieve data sharing.
8. How to enable service, how to deactivate service.
Start:
Context.startservice ()
and
Context.bindservice ().
Off: Context.stopservice ().
Service.stopself ()
Or
Service.stopselfresult ()
9. There are several ways to register a broadcast, and the advantages and disadvantages of these approaches. Let's talk about Android's introduction of the broadcasting System.
10. Please explain the relationship between the message, the Handler, the message Queue, and the looper in the single-threaded model.
What is the full name of Aidl. How to work. What types of data can be processed.
12. Please explain the difference between the runtime permissions of the Android program and the file system permissions. (edited by Sodino)
13. The system has a variety of browsers installed, can specify a browser to access the specified page. Please explain the original.
14. One-dimensional integer array int[]data preserves a picture pixel value information that is wide width and height. Please write an algorithm that adjusts the transparency of all white opaque (0xFFFFFFFF) pixels of the picture to 50%.
15. How do you evaluate the android system? Disadvantages (repetition of this question)
Advantage:
First, the open three, rich hardware choice five, seamless combination of Google application support
Disadvantages: Security and privacy
Second, the developer customization, not uniform four, the same type of user reduction
=========================
1, what is ANR how to avoid it.
Http://blog.csdn.net/Zengyangtech/archive/2010/11/21/6025671.aspx
2, what situation will cause force close. How to avoid. Can catch the exception that caused it.
3, the Android API does not declare that it throws an exception, it will be at run time to throw runtime exception, you have encountered it. What Noyo will cause problems. How to solve.
There is a Run-time exception, and Run-time exceptions do not need to be caught
4, briefly explain the activity, intent, intent filter, service, broadcast, Broadcasereceiver
This question is very common, let yourself see more. Not much to say here.
5. What are the advantages of intentservice?
"2011-5-12 Supplements"
1. The difference between Android:paddingleft and Android:layout_marginleft
When the button sets the above two properties separately, the effect is different.
android:paddingleft= "30px"
The content set on the button (for example, a picture) is 30 pixels from the left edge of the button
android:layout_marginleft= "30px"
The entire button is 30 pixels from the left set
2. What are the types of Android animations? Describe
Two kinds. Tween animations and frame animations. Tween animation is mainly transparency, size expansion, rotation, displacement and other effects.
Frame animation can be understood as a GIF, a frame-by-frame display picture. More commonly used is the scroll bar effect.
3. Understanding of intent, activity, broadcasting, service, etc.
4. Under what circumstances will ANR occur? How to correspond. (This question is repeated)
Application not Response.
5. The difference between implicit and explicit intent
· An explicit intent
Specifies the target component by name (This Component Name field component Name fields,
As mentioned earlier,
Has a set of values). Since component names are often not known to developers of other applications, explicit intent is typically used as an internal message for an application-for example, an activity that initiates an affiliate service or sister activity.
Implicit intent
Does not name the target component (component name character blank). Implicit intent is often used to activate components of other applications.
This is a reference intent note, you can look at the example of Notepad, help understand, personal feeling is very important.
(The above several questions feel all right, you check the leak to fill out.) Some have not written the answer, you have time to answer it ~ I will fill your answer up)
-------------------------------------------------------------------
2011-07-05 Supplements
Returns the difference between the key and the home key.
The back key default behavior is to finish the activity in front of the activities of the State is destroy state, to start it again starting from OnCreate (does not call the Onsaveinstancestate method )。 The home key defaults to the stop foreground activity, which is the state of OnStop, rather than the destroy, and if you start it again, the Onsaveinstancestate method is invoked, The status of the last activity was maintained from Onrestart---->onstart ()--->onresume ().
"2011-10-12" Baidu Android engineer face Test (provided by user) (see attachment)
"2011-11-21" Cisco face questions
1. How to pass binary data in Android.
2. What is ANR. Which cases will occur. How to find ANR when developing.
3. Explain Aidl
4. The principles of SAX, DOM, pull parsing xml, and their respective pros and cons
4. DIP, DPI is what respectively.
5.java The Sleep () of the Thread, wait (), notify (), the difference between the yield () method. The
1.sleep () causes the thread to hibernate for a period of time, after which the thread enters the executable state, but is not executed immediately, only when it is invoked by a scheduler. During hibernation, the held "lock" is not released, and
2.wait () causes the thread to hibernate for a period of time, and when the time is set, the thread automatically enters the executable state. If not, the Notify () method is required to invoke it. Note: When both the Wait () method and the Notify () method are used against the This object, the wait () method is invoked, releasing the lock on the object.
3.yield () causes the thread to discard the execution rights and enter the executable state, which means that the thread may execute again after the yield () method. Using the yield () method, the thread does not release the lock held by itself.