My android interview path (2: A New Start) and a new start for android

Source: Internet
Author: User

My android interview path (2: A New Start) and a new start for android
Never forget your initial intentions

I just came back from the presentation to a group of Entrepreneurial Organizations (hosted by VC) many people finally sent their resumes and received a call from the Beijing Company to inform me of the telephone interview (I want to work in Beijing--). In short, the specific time was arranged from the early test to the evening.

If you are not looking for a job, you never know how difficult it is to find a job. This is like when you really want to repair a sewer pipe, you find that I am relying on this smell to be tolerable. How can someone fix the sewer pipe?

Understanding myself is an important step. Knowing my short board is very helpful for learning. I am not a good guy, I am not an all-powerful shen, and I am not an algorithm. But I know what I lack. what can I do?

I don't forget my mind. I never knew why I remembered this sentence last night. Anyway, I felt like I was talking about it. I also wrote this blog and hoped that many people would help me find my problems. I will change my mind, I will be scolded, and I will be attacked, and I will love the world as long as I improve myself.

Still, I don't forget that android is always going on. So now, first of all, the most asked questions during the interview

Is it -------------> "what is the relationship between processes and threads"

What are processes and threads? I am not going to post them to Baidu.

First, let me briefly talk about my ideas.

A process is used to process tasks. For example, if a list is provided for the process, you need to find the process named AI fengwu.

The process thought about how to look for such a long list. How can I find it? How can I send my hand to a dry thread? It's like my hand? For example, there are three threads, three younger siblings, and three people are looking for the unlucky guy ai feng Wu?

(I don't know if the metaphor is inappropriate. If not, ignore it --)

CPU ---> This product is the core of the computer. It will count (carry computing tasks)

But it is also an ordinary person who can only run one thing at a time.

Process ---> This product is the one with only one CPU running at a time.

When a process is running, other processes are not running.

Thread ---> A process can have many threads. They collaborate to complete a task.

The memory space of the process is shared by threads. They share these resources.

However, some sharing functions are conditional. Some allow only one thread to use and some allow several threads to be used by others.

What should we do to prevent waiting people from joining the queue? We need to add a lock. For example, if a room goes in and a thread locks the door to prevent others from entering the room and queue them for waiting.

This lock is called a mutex lock to prevent multiple threads from writing a piece of memory at the same time.

Let a few people use it. What should I do? The people who put a few keys at the door will lock the door until the key tree at the door is ready, and they will not be able to get in, but they will have to wait for the brother.

These keys are called semaphores to ensure that multiple threads do not conflict.

    

The above are the explanations of processes and threads:

(Above and below are plagiarized Ruan Yifeng's blog "process and thread a simple explanation" http://www.ruanyifeng.com/blog/2013/04/processes_and_threads.html)

  

1. The operating system allows multiple tasks to run simultaneously in the form of multiple processes

2. Multiple Threads are allowed to run tasks in different parts.

3. The operating system provides a certain coordination mechanism. On the one hand, it allows resources to be shared between processes AND threads, on the other hand, it also prevents conflicts between processes AND threads.

  

In a word, I can express my opinion with pride on the interviewer (I can't say anything during the first interview --)

Some interviewers asked me this question. Do you know how to communicate with each other?

"..."

I'm sorry for the operating system teacher --

Inter-process communication can be divided into pipeline shared memory semaphore signal socket Message Queue

 

How do I use process-to-process communication in android?

"What I have done is to intercept a person's phone and send it to the dialing process for hanging up the phone."

"This is called the Android Interface Definition Language (AIDL). The Android Interface Definition Language (for details, click-|)."

The interviewer must laugh at me silently--Because I am not fluent

Google is fine.

 

What about the thread?

Interviewer why are you so diao? It makes me breathe.

"Inter-thread communication. This is the message transmission mechanism MessageQueue, Loop, Handler."

"Handler processes received messages and sent message queues, which are MessageQueue. Each thread has a logoff to read messages in MessageQueue."

Okay, OK.

PS: say OK, the interviewer can use the hammer mobile phone. I am also the last time he returned to the desktop, he found that he did not see a few eyes, but he still did not see the real machine. soft Text of a hammer)

    

Let's find a problem and quickly point out my mistakes --

Thank you!

I 've been writing it for a long time. Every day, it's a new start. ^_^


Android interview files

I have been paying attention to Android for a long time. Last year, there were still a few Android jobs. Now, the job has sprung up. I went to various recruitment websites and entered the Android keyword in the job column, you will find many vacant positions. this will undoubtedly bring new opportunities to the majority of programmers. As long as you have half a year or a year of Android testing, you will be very eager. I believe that as long as you submit your resume, I do not dare to say "yes" for each vote. At least there is a probability that there will be at least four or five yuan.

So what do every company need to recruit Android Developers? In my personal opinion, let's talk about the requirements that Android Developers should possess.

To be honest, it is very easy for programmers who have been engaged in java to switch to android. Two or three months of research is enough, in the world, it is okay to buy an entry to the android book. I personally think it is relatively simple, but it is still difficult to be creative. if you only want to be a simple android Application Developer, you only need to prepare Java knowledge (multithreading, Socket communication, etc.) and then have a slight understanding of Android (such as Android architecture and Activity, and the lifecycle of an application ). I believe I can handle this.

However, if you want to develop a lower-layer architecture, such as embedded development (Android driver development), you need to know more about it. After all, Arm + Android is very promising this year. you need to understand Linux, Arm, C, C ++ and other knowledge. After all, this requirement is quite high. you can buy an arm development board, and then port android to it for driver development and application development. In this way, you can apply for an application to directly bring your stuff to the market.

Android interview questions

1. Preface
In June 26, Google Android released NDK, which aroused the interest of many developers. NDK full
It is called Native Development Kit. Is:
.Android.com /....
2. misunderstanding
In addition to surprises, new things will also bring us some confusion and misunderstanding.
2.1 misunderstanding 1: Android does not support C development before NDK is released
Search for "NDK" in Google, and many "Android can finally be developed using C ++" and so on.
This is a misunderstanding of the Android platform programming method. In fact, since its birth, the Android platform has
Supports C and C ++ development. As we all know, Android sdks are implemented based on Java, which means
Third-party applications developed by the SDK must use the Java language. However, this is not equivalent to "third-party applications can only
Use Java ". At the first release of the Android SDK, Google claimed that its virtual machine Dalvik supported JNI programming.
Method, that is, third-party applications can call their own C dynamic library through JNI, that is, on the Android platform,
The "Java + C" programming method can always be implemented.
Of course, the root cause of this misunderstanding is that no JNI can be found in the Android SDK documentation.
Help. Even if third-party application developers use JNI to complete their own C dynamic link library (so) development
How to package and release the SDK together with the application? There are also technical barriers. I used to spend a lot of time,
Install the cross-compiler to create the so and use the asset (Resource) method to bind the so release. But this method only
It can be a clever way, not an official... the rest of the full text>

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.