Recently, we have been studying the function of a video lock, that is, setting a lock on the video playback interface. When the lock becomes effective, it will shield back, home, menu.
Both the back and menu keys can be intercepted through the onKeyDown and onKeyUp functions at the app layer. But the home key does not work.
So I checked the method of shielding the home
(LOG_TAG, "lock");} else if (SYSTEM_DIALOG_REASON_ASSIST.equals (reason) {// samsung long press the Home key Log. I (LOG_TAG, "assist ");}}}}
Note that the buttons on different mobile phones are different, so you need to differentiate the different reasons.
Home Key listens for broadcast Registration
There are two methods for registering a broadcast receiver. One is static registration, which is written in
OK. As explained above, the system has started zygote from the init process --> started SystemServer --> ??? So what should we start now?
According to the previous analysis, the basic native and java World environments have been established, so there is still a HOME page display? The visualization system is about to begin.
In Zygote, there is a function:
Main @ frameworks \ base \ core \
(WindowManager. LayoutParams. TYPE_KEYGUARD );Super. onAttachedToWindow ();}
Method 2: You may need to modify the source code and the source code of the system. This is troublesome and is not recommended. You just need to use the first method.
Another alternative is the implementation method, that is, you can determine that you have clicked the Home key based on your business.
As this article was written earlier and has not been tested for Versi
[Go to] Android statusbar: Add back, home, and menu buttons
Add the home, back, and menu menus to the system status bar on the android interface and complete the corresponding system functions. And the higlight effect is displayed. Modify the height of the status bar and the text size on the status bar.
This requires the android SDK to be modified. I use eclair. The following describes my operations.
1. Fir
What is home screen WidgetsThe home screen widget, called a gadget or a Chinese gadget, is a view that is displayed on the home page and updates the views data through the background process.Android is managed by Appwidgetmanager to manage the widgets of the system. After installing the APK, the widget's name, icon, and space are displayed in the widget list acco
As we all know, the following two methods cannot be used to listen to the Return key event: [java] view plaincopyprint?@ OverridePublic void onBackPressed (){// Do something// Super. onBackPressed ();}@ OverridePublic boolean onKeyDown (int keyCode, KeyEvent event ){If (keyCode = KeyEvent. KEYCODE_BACK ){// Do something}Return super. onKeyDown (keyCode, event );}
@ OverridePublic void onBackPressed (){// Do something// Super. onBackPressed ();}@ Overr
)) {//Samsung Long Press the home buttonLOG.I (Log_tag, "assist"); } } }} Note that different phone keys are different, so you need to make a distinction between different reasons.Home key monitoring broadcast registrationThere are two ways to register a broadcast receiver, one is static registration, which is written in manifest, and the other is dynamic registration, which is registered in Java
(System_dialog_reason_lock.equals (REASON)) {//Lock screen log.i (Log_tag, "lock "); } else if (System_dialog_reason_assist.equals (REASON)) {//Samsung long press the home key log.i (Log_tag, "assist"); } } }}Note that different phone keys are different, so you need to make a distinction between different reasons.Home key monitoring Broadcast registrationThere are two ways to register a broadcast receiver, one is stati
Andorid4.x rogue shield HOME Key, andorid4.xhome
Reposted please list the source http://blog.csdn.net/steelychen/article/details/37757341
The HOME key must be blocked for the application project. The requirement of the project itself is that the program does not respond after the HOME key is pressed, just like pressing the back key, directly returning nothing in
Add the home, back, and menu menus to the system status bar on the android interface and complete the corresponding system functions. And the higlight effect is displayed. Modify the height of the status bar and the text size on the status bar.
This requires the android SDK to be modified. I use eclair. The following describes my operations.
1. First, complete the display.
File to be modified
. /Frameworks/base/services/
From http://www.eoeandroid.com/thread-109270-1-1.html
You have read many articles about the general method to block the Home key. To sum up, let's first talk about the screen button and Home Key of the activity.
Shield other keys and override onkeydown
Java code:
@ Override
Public Boolean onkeydown (INT keycode, keyevent event ){
Log. I (TAG, "keycode =" + k
Groundhog Build HomeTime limit:15000/5000 MS (java/others) Memory limit:65536/65536 K (java/others)Total submission (s): 2647 Accepted Submission (s): 1074Problem Descriptiongroundhogs was good at digging holes, their home is a hole, usually a group of Groundhogs would find a M Ore suitable area for their activities and build their
The PHP Global Developers Conference will be held in Beijing from May 14, 2016 to 15th, before the meeting, one of the speakers of this event, Link home network platform architect Yi LV teacher to carry out a text interview, the text in bold part for the DevLink reporter, the fine part of the Yi LV teacher.
Yi Lv Teacher Hello, can you first introduce your own technology history?
Good.
I taught myself some web development techniques while I was in
Http://www.catr.cn/txjs/jsyj/200611/t20061108_470533.htm
Remote Management Technology for home network devices
Liu Qian
【Key words] Home Network Remote Management System TR-069
SummaryFirstly, the necessity, content and related technical problems of remote management of home network equipment are expounded. T
Android 4.0 disables the system home key, android4.0
2.2 disable the system home key.
Recently, the project has a requirement to disable all system keys, such as menu, home, and back. At the same time, you also want to click the response and view pop-up. That is, the UI part should be normal.
The back key is disabled by onKeyDown.
I personally think that the simp
10 years ago, talking about mobile phones, we think of the word is probably: phone, SMS, QQ, photo, as well as a limited number of small games such as snake. Today, mobile phones have undoubtedly become an integral part of people's lives. This is a magical thing: communication tools, takeaway artifact, game consoles, mobile office, travel treasure ... Even the various transactions in life can be done via mobile phones. These rich features rely on apps for mobile phones, not to mention the magic
Sometimes the APP we write needs to save data before pressing the HOME Key to return to the desktop, which involves monitoring the HOME event, the following describes how to use the broadcast listening HOME Event code and code. (PS: This code is extracted from the source code of an APP called chat ~ I am writing how to use it. Isn't it plagiarism ?!)
HomeWatcher.
Flag_activity_clear_top":Assume that the current activity's task stack is mainactivity–> a–> b–> Active (if we press the back key, we return b,a, and finally mainactivity. Now intent to evoke mainactivity and find that it exists on the stack, then it is clear that it and all before it, and after the new activity is aroused, the task stack is mainactivity. Note that by tracking the activity object, a new instance of mainactivity will be generated, not the original, and the original has been kill
From: http://rootfs.wordpress.com/2010/07/23/android-enable-home-screen-lock-and-home-key/
The lock pattern does not take effect after setting. And the home key does not work.
1. Frameworks/base/policies/phone/COM/Android/Internal/policy/impl/keyguardviewmediator. java.
In private void dokeyguard () routine:
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.