What are the methods for starting and stopping a service on an Android system, using pseudo-code, and how do these methods lead to a different life cycle of the service?
Two, enter a positive integer X, increment in 2*x,4*x,8*x, when greater than 10000, and then flashback output has been output integer. "Requirements: Do not use loops and any other variables (including local variables) to assist"
For example, x= 2468, the output is:
2468,4936,9872,19744,19744,9872,4936,2468
There are two strings consisting of different letters, one long and one short, the long is a and the short is B. Design an algorithm that returns true if all characters appearing in B appear in a, otherwise false. It is assumed that the length of a m,b is N, which requires that the algorithm time complexity cannot be greater than O (m+n).
The implementation of the following worker class Ikworker, the caller by calling AddJob to submit the runnable type of job to Ikworker,ikworker is responsible for the asynchronous execution of all submitted job. "Requirements: be as efficient as possible and not use the system's thread pool"
public interface ikworker{
public boolean Start ();
public void AddJob (Runnable job);
public boolean Stop ();
}
Implement an app in Android phone for file download, add to the app interface, pause and cancel the download of files and show the progress of the download process, and ensure that the background can still be downloaded when the activity exits. When the interface starts, it can also display the files and progress that are being downloaded. "Requirements: Write the design idea of implementing this app, as easy as possible to understand, concise"
Six, the system/sdcard/directory has a lot of pictures, now need an activity through thumbnails to browse all the pictures, in the design reflects the three point of processing:
A. cannot be paged, all pictures are displayed on one page
B. To reflect the processing of the ANR
C. To embody the treatment of oom
Please write the design idea of this activity
Vii. What is the way to transfer big data between two processes in Android? Which of these approaches is most efficient? explain why.