1. Encryption
Symmetric encryption: Encrypt and decrypt data using the same key, such as Des
Asymmetric encryption: Encryption and decryption use different keys. Before sending data, the public and private keys are generated with the server contract, and the data encrypted with the public key can be decrypted with the private key, not vice versa. such as RSA, SSH, SSL.
Security issues with 2.android
① Error Export component
② parameter check is not strict
③webview introduces various security issues (JS injection)
④ not confusing, may wish to pack two times
⑤ storing key information in plaintext
⑥ Error using HTTPS
⑦ Cottage Encryption Method
⑧ abuse of permissions, memory leaks, using debug signatures
3. The life cycle of the device when the screen is switched
① do not set the android:configchanges, the screen will recall the life cycle, cut across the screen will be executed once, cut the vertical screen will be executed two times.
② when setting android:configchanges = "orientation", each life cycle is executed only once when you cut the screen vertically
③ setting android:configchanges = "Orientation|keyboard" will not invoke each life cycle, only walk onconfigurationchanged method
4.android inter-process communication mode
Intent,binder (aidl), Messenger,broadcastreceiver
The difference between 5.Parcelable and serializable
Serializable: Easy to use. Cons: Using reflection, the serialization process is slow. Use IO to read and write storage on the hard disk.
Parcelable: Speed comes first. Read and write directly in memory.
The difference between 6.wait () and sleep ()
①sleep from the thread class, wait () from the object class
The thread does not release the object lock during ② call to the Sleep () method. And the Wait method releases
③sleep after sleep does not sell system resources, wait to assign system resources other threads can consume CPU
④sleep need to specify a sleep time, the time to automatically wake up
7. Heap and Stack differences
① a reference to a variable and an object of the base data type are allocated on the stack
② heap memory is used to hold objects and arrays created by new
③ class variable (static variable) program a load class allocates memory for class variables in the heap, and memory addresses in the heap are stored in the stack
④ instance variable: When new, the system opens up in the heap and does not necessarily provide continuous space to the variable, when the reference is lost, is included in the recyclable list, will not immediately release the heap memory
⑤ Local variables: Declared in a method or code snippet, the memory is opened up in the stack, and when the local variable is out of scope, the memory is immediately released.
8.TCP/IP Model Four Layer
Application Layer---Transport layer (TCP/UDP)---network interconnect layer (IP)---host to network layer
9.ANDROID System Structure
Application Layer---Application framework layer---Function library---linux kernel
10. Common layout
LinearLayout---relativelayout---framelayout---tablelayout---absolutelayout
Android face Test