Special Functions of android help communication problems.
In actual project applications, a recent requirement is that a function of the system cannot work after a special application is entered. Of course, there are many ways to achieve this communication. I can think of at least the following types
1. Use the familiarity of property to implement it. In this case, a special attribute needs to be added;
2. Use the database to add a record to the database and set it when entering the application, in the system, you can use the content observer or determine whether to read this value before special events;
3. Use intent to send a special intent and install a filter on the system side;
4. Use getRunningTasks, that is, the operation information of activities service, to judge;
The above four methods can be implemented, but it is not better to solve this problem by using some information of the existing system! Therefore, the author chooses solution 4, that is, to create an interface in which to determine whether the special application is at the frontend. This is very useful. The simple code is as follows:
public boolean judgeTopActivityIsReverseVideo(int status){ String topActivityClassName=null; if(am == null) am =(ActivityManager)(mContext.getSystemService(mContext.ACTIVITY_SERVICE )) ;List<RunningTaskInfo> runningTaskInfos = am.getRunningTasks(1);if(runningTaskInfos != null){ComponentName f=runningTaskInfos.get(0).topActivity;topActivityClassName=f.getClassName();}//Slog.d(TAG, "####topActivityClassName: "+topActivityClassName);if (topActivityClassName!=null&&topActivityClassName.startsWith("com.softwinner.reversevideo.ReverseVideo")){ if(1 == status) mReverseVideoAppEnter = true;/*In apk, reverse video comming*/else mReverseVideoAppEnter = false;/*In apk, reverse video outgoing*/return true;} else if(true == mReverseVideoAppEnter){ /*Enter ReverseVideo apk, reverse video signal comming,then press BACK/HOME key, apk exit, but reverse video signal not exit, so we need a flag note this special status*/ mReverseVideoAppEnter = false; return true;}return false; }
This method is completely feasible through the author's test practice.
Where is the BUG in the android system?
Several bugs frequently occur due to nine defects in the Android system.
Mobile phone information leakage in Android systems is very serious
Start with the number of common faults in all versions of Android. The most shameful thing about users is that the recent Wall Street Journal hired two security analysts to find that Google's Android mobile phones and Apple's iPhone will automatically collect information about users' whereabouts, and return the private information to the two companies. The investigation found that HTC mobile phones using Android can automatically display the name, location, wireless network signal strength near the location, and a special phone identification number every few seconds, this information is sent to Google multiple times every hour.
What are the explanations of the above problems? Obviously, your privacy has been completely exposed to Google when you use Android mobile phones, and your privacy has been relentlessly trampled!
Many people may have doubts that Google's collection of such information does not seem to do much harm to me? That's right. In an intuitive view, Google uses the Android system to collect your information, so you won't lose your skin. However, in an age where information technology controls everything, if your credit card information is lost, are you not afraid? Think about the terrorist tycoon bin Laden, who was just hunted by the US military seals a few days ago. Isn't it because the information was locked by the US military and the victim was poisoned? Isn't that enough to warn you?
Shutdown and serious deviation from user needs are not supported
Then there is something almost common to all players. Google's one thousand times and 10 thousand times of upgrades have nothing to do with it. It simply does not support shutdown and alarm. It can be said that many mobile phone players in the Android system are now "rebellious" from the Saipan System, including the small Editor himself. Many players once liked sleeping and shutting down at night, and shouted at the street because of the disadvantages of the Android system.
Yes, many people compromise in the face of the gorgeous Android system interface, a variety of applications, and cool functions. However, the Android system does not support shutdown and the alarm cannot be avoided.
Some people may say that iPhone 4 and Microsoft do not support shutdown. That's right, but the mobile phone support of the Saipan system, the mobile phone support of the MTK chip, and the mobile phone of the Zhan Xun chip are not supported for any reason! If this reason is not enough to keep you awake, I will tell you that Lenovo happy Phone, which is also developed based on the Android system, is supported! Why can't you decide what Lenovo can do! Is it a poor performance, or has it not really considered user needs?
After dialing, the phone is automatically hung up and the call BUG frequently occurs.
The basic function of mobile phones is communication tools. No matter how much technology develops, this is beyond doubt. However, the Android system has a problem with the basic call function. One thing that many netizens in the Forum have responded to is that Android phones often encounter such depressing situations during dial-up calls. After dialing, the phone is automatically hung up before it is connected. Moreover, this is not a problem with an Android phone, but a common problem with many Android mobile phones.
A netizen in the Forum reported that similar problems were found in ZTE X876, Sony Ericsson LT15i, Motorola ATRIX, LG Optimus and other models.
During the trial of the Android mobile phone system, Xiao Bian also found that many models had the same problem, and many colleagues around him also reflected the same. As for many people, this situation may be caused by the blockage of the light sensor or the distance sensor during the phone call. The editor can give a definite negative answer. This problem also occurs when the mobile phone is not exposed to the head, and the light sensor and distance sensor are not blocked. It seems that Google's vocabulary is far away from perfection.
High hardware configuration requirements and increased manufacturing costs
Recently, mobile phones with various high-frequency processors and various high RAM memory are frequently present, offering gamers an almost gorgeous visual feast. It can be said that Google's Android system has contributed a lot in this process. The reason is very simple. The Android mobile phone system requires too much hardware configuration, if manufacturers do not launch high-hardware-standard mobile phones, how can they establish a foothold in this age of fierce competition? However, let's look at the prices of these high-configuration mobile phones from another perspective? If you are not a rich generation, and your father is not Li Gang, you must ...... the remaining full text>
In Android development, how can we call the system's functions? Pay attention to the following description.
Do you refer to the information module as the interface for clicking the text message icon on your mobile phone?
In android, text messages and address books are actually programs. In these programs, you can call system functions, such as text messages and phone calls, through user operations on the interface.
You can click the menu to directly call the text message function, or open the system's text message program.