2015 Annual Summary--android development

Source: Internet
Author: User

Although the Lunar New Year is the beginning of the first, but the issue of Chinese and Western culture is not discussed here, the so-called "equality between men and women, the public is justified, the PO said that the right, yin and yang calendar, you live your year." ”

See a lot of friends in the annual summary, so think about what I was doing this year, also summarize it

If you want to say what I have done this year, what is the value, what is the point, in fact, I can not conclude that from the company's point of view, I think I do the project is not optimistic, but good or bad is not absolute, it may be a period of time to return to another situation.

So I'm just talking about technical issues.

This year mainly to do an Android program, first on the use of the Map SDK, due to the offline navigation function, the first use of the high-German map, but because of the German SDK does not have offline navigation function, and therefore replaced by Baidu Map, Baidu's SDK is offline navigation (offline map and offline navigation is separate, Offline map and Baidu SDK are supported), but need to apply, but later did not apply, estimated that the function is provided to the car navigation manufacturers, estimated to be charged, may also be expensive, and then by the way Baidu navigation app reluctantly meet the requirements, so that it is necessary to install "Baidu navigation", Offline resources should also be downloaded in Baidu navigation.

After processing the map and navigation functions, and then began to do similar to the mobile Office OA and other functions, mainly the writing interface and interaction with the server side.

When writing the interface is the trouble is to deal with the list in Android, due to the performance of the reasons, the list shows the sub-view is to be recycled and reused, which leads to a lot of problems. For example, put a checkbox in the list, select and then scroll the list, let the selected checkbox scroll out of the screen, if not done, scroll back after the checkbox is not selected state, It may also appear that the checkbox that appears below when scrolling is selected by default.

There are also pictures of the loading will appear similar to the situation, the picture will be disorderly, and so on, these are the places to pay attention to, I downloaded an application in the market has been released a program, there is the situation above.

With respect to the interaction with the server, there are a lot of things that can be optimized, the way it is implemented in the project is also being improved, the project is using volley to handle network requests, and using volley can simplify many operations. When sending a network request, you need to join the waiting state and handle the record failure, and so on, the first is to put the code in another class, but because the interface is not used in the callback is cumbersome (the function in Java can not be passed as a parameter), and then directly put the request into the activity or dialog. , the code looks a bit messy, but it's a lot easier.

Then wrote a volleyhelp and an interface Volleyhandle, in the need to initiate a network request to implement the Volleyhandle interface, just like the onclick event, the method implemented in the interface, mainly is the operation before the start of the request, there is data return, has requested the method of failure, so it is convenient to use a lot, the main concern is that several functions, do not need to copy a lot of volley related things come over.

Although this is already very convenient to use, but there are a lot of things to improve. For example, here does not consider the situation of the cache, we hope the situation is that the list of data as long as the load once, and then refresh if there is no update, it does not repeat the load, but this is a more troublesome place is how to judge the data is not updated, the data is placed on the server side so need to send a request to judge In fact, the server side is not good to judge, the general data is stored in the database, to judge is to query the database again. It is also necessary to MD5 the returned data, and then the client passes the MD5 value for judgment. Of course there may be a better way, and I can only think of that at the moment.

Of course, in general, do not consider the refresh after the data is updated to interpret, as long as the refresh to reload the data, in fact, this is also possible, so the general load list is to be paged, and there is not too much data.

Another scenario for caching is to display the last loaded data without a network, so that you don't have to open the software without a network and nothing in the software.

Consider the situation of the cache, you need to further the network request processing, I think the future Network request SDK may be added to the caching mechanism, perhaps already have such an SDK and I did not find. The current project does not consider the cache, and later to improve the words to do it.


In addition to the UI and network requests, because of permissions issues, to set up the APN, so I went to the very Cow B code injection technology, because it involves the bottom of the very cow B, but because of the compatibility and the need for root permissions, so in the project does not use this technology, about the code injection problem, I " Through the passage of a few articles, has been written, here do not introduce.


In addition to cross-platform is also always concerned about, this year, Facebook open source react native, including Android and iOS, so there is time to run to toss a bit of react native, also wrote several environmental building articles, but also just run a few demo, is not used in actual development, because there is not much time to pits, or feel more reliable with the original.

Last year (2014) to do an app, due to a large number of use of pictures, causing memory overflow, for a long time, this year seems to see the solution can solve the memory shortage, the same is the Facebook open source Image cache Framework Fresco,fresco use the NDK, There is a one-level native cache that seems to solve the problem of insufficient memory for Android programs. But there is no time to do too much research.

In addition to some of the contents of Android and Javaweb, more content, put to the next bar, there is time to write, although today is 1th, but the Lunar New Year has not yet begun, so it can still be called the annual summary, haha.

For more information, please follow my public number: Zhaojietec

2015 Annual Summary--android development

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.