AccessibilityService 官网介绍
AccessibilityService
extends Service
| java.lang.Object | ||||
| ↳ | android.content.Context | |||
| ↳ | android.content.ContextWrapper | |||
| ↳ | android.app.Service | |||
| ↳ | android.accessibilityservice.AccessibilityService | |||
Class Overview
An accessibility service runs in the background and receives callbacks by the system when AccessibilityEvents are fired. Such events denote some state transition in the user interface, for example, the focus has changed, a button has been clicked, etc. Such a service can optionally request the capability for querying the content of the active window. Development of an accessibility service requires extending this class and implementing its abstract methods.
Developer Guides
For more information about creating AccessibilityServices, read the Accessibility developer guide.
Lifecycle
The lifecycle of an accessibility service is managed exclusively by the system and follows the established service life cycle. Additionally, starting or stopping an accessibility service is triggered exclusively by an explicit user action through enabling or disabling it in the device settings. After the system binds to a service it calls onServiceConnected(). This method can be overriden by clients that want to perform post binding setup.
Declaration
An accessibility is declared as any other service in an AndroidManifest.xml but it must also specify that it handles the "android.accessibilityservice.AccessibilityService" Intent. Failure to declare this intent will cause the system to ignore the accessibility service. Additionally an accessibility service must request the BIND_ACCESSIBILITY_SERVICE permission to ensure that only the system can bind to it. Failure to declare this intent will cause the system to ignore the accessibility service. Following is an example declaration:
<service android:name=".MyAccessibilityService"
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
. . .
</service>
Configuration
An accessibility service can be configured to receive specific types of accessibility events, listen only to specific packages, get events from each type only once in a given time frame, retrieve window content, specify a settings activity, etc.
There are two approaches for configuring an accessibility service:
- Providing a
meta-dataentry in the manifest when declaring the service. A service declaration with a meta-data tag is presented below:<service android:name=".MyAccessibilityService">
<intent-filter>
<action android:name="android.accessibilityservice.AccessibilityService" />
</intent-filter>
<meta-data android:name="android.accessibilityservice" android:resource="@xml/accessibilityservice" />
</service>Note: This approach enables setting all properties.
For more details refer to
SERVICE_META_DATAand<.accessibility-service> - Calling
setServiceInfo(AccessibilityServiceInfo). Note that this method can be called any time to dynamically change the service configuration.Note: This approach enables setting only dynamically configurable properties:
eventTypes,feedbackType,flags,notificationTimeout,packageNamesFor more details refer to
AccessibilityServiceInfo.
Retrieving window content
A service can specify in its declaration that it can retrieve the active window content which is represented as a tree of AccessibilityNodeInfo. Note that declaring this capability requires that the service declares its configuration via an XML resource referenced by SERVICE_META_DATA.
For security purposes an accessibility service can retrieve only the content of the currently active window. The currently active window is defined as the window from which was fired the last event of the following types: TYPE_WINDOW_STATE_CHANGED, TYPE_VIEW_HOVER_ENTER,TYPE_VIEW_HOVER_EXIT, In other words, the last window that was shown or the last window that the user has touched during touch exploration.
The entry point for retrieving window content is through calling AccessibilityEvent.getSource() of the last received event of the above types or a previous event from the same window (see AccessibilityEvent.getWindowId()). Invoking this method will return anAccessibilityNodeInfo that can be used to traverse the window content which represented as a tree of such objects.
Note An accessibility service may have requested to be notified for a subset of the event types, thus be unaware that the active window has changed. Therefore accessibility service that would like to retrieve window content should:
- Register for all event types with no notification timeout and keep track for the active window by calling
getWindowId()of the last received event and compare this with thegetWindowId()before calling retrieval methods on the latter. - Prepare that a retrieval method on
AccessibilityNodeInfomay fail since the active window has changed and the service did not get the accessibility event yet. Note that it is possible to have a retrieval method failing even adopting the strategy specified in the previous bullet because the accessibility event dispatch is asynchronous and crosses process boundaries.
Notification strategy
For each feedback type only one accessibility service is notified. Services are notified in the order of registration. Hence, if two services are registered for the same feedback type in the same package the first one wins. It is possible however, to register a service as the default one for a given feedback type. In such a case this service is invoked if no other service was interested in the event. In other words, default services do not compete with other services and are notified last regardless of the registration order. This enables "generic" accessibility services that work reasonably well with most applications to coexist with "polished" ones that are targeted for specific applications.
Note: The event notification timeout is useful to avoid propagating events to the client too frequently since this is accomplished via an expensive interprocess call. One can think of the timeout as a criteria to determine when event generation has settled down.
Event types
TYPE_VIEW_CLICKEDTYPE_VIEW_LONG_CLICKEDTYPE_VIEW_FOCUSEDTYPE_VIEW_SELECTEDTYPE_VIEW_TEXT_CHANGEDTYPE_WINDOW_STATE_CHANGEDTYPE_NOTIFICATION_STATE_CHANGEDTYPE_TOUCH_EXPLORATION_GESTURE_STARTTYPE_TOUCH_EXPLORATION_GESTURE_ENDTYPE_VIEW_HOVER_ENTERTYPE_VIEW_HOVER_EXITTYPE_VIEW_SCROLLEDTYPE_VIEW_TEXT_SELECTION_CHANGEDTYPE_WINDOW_CONTENT_CHANGEDTYPE_ANNOUNCEMENTTYPE_GESTURE_DETECTION_STARTTYPE_GESTURE_DETECTION_ENDTYPE_TOUCH_INTERACTION_STARTTYPE_TOUCH_INTERACTION_ENDTYPE_VIEW_ACCESSIBILITY_FOCUSEDTYPE_WINDOWS_CHANGEDTYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED
Feedback types
Summary
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | GESTURE_SWIPE_DOWN | The user has performed a swipe down gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_DOWN_AND_LEFT | The user has performed an down and left gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_DOWN_AND_RIGHT | The user has performed an down and right gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_DOWN_AND_UP | The user has performed a swipe down and up gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_LEFT | The user has performed a swipe left gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_LEFT_AND_DOWN | The user has performed a left and down gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_LEFT_AND_RIGHT | The user has performed a swipe left and right gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_LEFT_AND_UP | The user has performed a left and up gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_RIGHT | The user has performed a swipe right gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_RIGHT_AND_DOWN | The user has performed a right and down gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_RIGHT_AND_LEFT | The user has performed a swipe right and left gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_RIGHT_AND_UP | The user has performed a right and up gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_UP | The user has performed a swipe up gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_UP_AND_DOWN | The user has performed a swipe up and down gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_UP_AND_LEFT | The user has performed an up and left gesture on the touch screen. | |||||||||
| int | GESTURE_SWIPE_UP_AND_RIGHT | The user has performed an up and right gesture on the touch screen. | |||||||||
| int | GLOBAL_ACTION_BACK | Action to go back. | |||||||||
| int | GLOBAL_ACTION_HOME | Action to go home. | |||||||||
| int | GLOBAL_ACTION_NOTIFICATIONS | Action to open the notifications. | |||||||||
| int | GLOBAL_ACTION_POWER_DIALOG | Action to open the power long-press dialog. | |||||||||
| int | GLOBAL_ACTION_QUICK_SETTINGS | Action to open the quick settings. | |||||||||
| int | GLOBAL_ACTION_RECENTS | Action to open the recent apps. | |||||||||
| String | SERVICE_INTERFACE | The Intent that must be declared as handled by the service. |
|||||||||
| String | SERVICE_META_DATA | Name under which an AccessibilityService component publishes information about itself. | |||||||||
| [Expand]
Inherited Constants
|
|||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AccessibilityService() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| AccessibilityNodeInfo | findFocus(int focus)
Find the view that has the specified focus type.
|
||||||||||
| AccessibilityNodeInfo | getRootInActiveWindow()
Gets the root node in the currently active window if this service can retrieve window content.
|
||||||||||
| final AccessibilityServiceInfo | getServiceInfo()
Gets the an
AccessibilityServiceInfo describing this AccessibilityService. |
||||||||||
| Object | getSystemService(String name)
Return the handle to a system-level service by name.
|
||||||||||
| List<AccessibilityWindowInfo> | getWindows()
Gets the windows on the screen.
|
||||||||||
| abstract void | onAccessibilityEvent(AccessibilityEvent event)
Callback for
AccessibilityEvents. |
||||||||||
| final IBinder | onBind(Intent intent)
Implement to return the implementation of the internal accessibility service interface.
|
||||||||||
| abstract void | onInterrupt()
Callback for interrupting the accessibility feedback.
|
||||||||||
| final boolean | performGlobalAction(int action)
Performs a global action.
|
||||||||||
| final void | setServiceInfo(AccessibilityServiceInfo info)
Sets the
AccessibilityServiceInfo that describes this service. |
||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| boolean | onGesture(int gestureId)
Called by the system when the user performs a specific gesture on the touch screen.
|
||||||||||
| boolean | onKeyEvent(KeyEvent event)
Callback that allows an accessibility service to observe the key events before they are passed to the rest of the system.
|
||||||||||
| void | onServiceConnected()
This method is a part of the
AccessibilityService lifecycle and is called after the system has successfully bound to the service. |
||||||||||
| [Expand]
Inherited Methods
|
|||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Constants
public static final int GESTURE_SWIPE_DOWN
The user has performed a swipe down gesture on the touch screen.
public static final int GESTURE_SWIPE_DOWN_AND_LEFT
The user has performed an down and left gesture on the touch screen.
public static final int GESTURE_SWIPE_DOWN_AND_RIGHT
The user has performed an down and right gesture on the touch screen.
public static final int GESTURE_SWIPE_DOWN_AND_UP
The user has performed a swipe down and up gesture on the touch screen.
public static final int GESTURE_SWIPE_LEFT
The user has performed a swipe left gesture on the touch screen.
public static final int GESTURE_SWIPE_LEFT_AND_DOWN
The user has performed a left and down gesture on the touch screen.
public static final int GESTURE_SWIPE_LEFT_AND_RIGHT
The user has performed a swipe left and right gesture on the touch screen.
public static final int GESTURE_SWIPE_LEFT_AND_UP
The user has performed a left and up gesture on the touch screen.
public static final int GESTURE_SWIPE_RIGHT
The user has performed a swipe right gesture on the touch screen.
public static final int GESTURE_SWIPE_RIGHT_AND_DOWN
The user has performed a right and down gesture on the touch screen.
public static final int GESTURE_SWIPE_RIGHT_AND_LEFT
The user has performed a swipe right and left gesture on the touch screen.
public static final int GESTURE_SWIPE_RIGHT_AND_UP
The user has performed a right and up gesture on the touch screen.
public static final int GESTURE_SWIPE_UP
The user has performed a swipe up gesture on the touch screen.
public static final int GESTURE_SWIPE_UP_AND_DOWN
The user has performed a swipe up and down gesture on the touch screen.
public static final int GESTURE_SWIPE_UP_AND_LEFT
The user has performed an up and left gesture on the touch screen.
public static final int GESTURE_SWIPE_UP_AND_RIGHT
The user has performed an up and right gesture on the touch screen.
public static final int GLOBAL_ACTION_BACK
Action to go back.
public static final int GLOBAL_ACTION_HOME
Action to go home.
public static final int GLOBAL_ACTION_NOTIFICATIONS
Action to open the notifications.
public static final int GLOBAL_ACTION_POWER_DIALOG
Action to open the power long-press dialog.
public static final int GLOBAL_ACTION_QUICK_SETTINGS
Action to open the quick settings.
public static final int GLOBAL_ACTION_RECENTS
Action to open the recent apps.
public static final String SERVICE_INTERFACE
The Intent that must be declared as handled by the service.
public static final String SERVICE_META_DATA
Name under which an AccessibilityService component publishes information about itself. This meta-data must reference an XML resource containing an < tag. This is a a sample XML file configuring an accessibility service:accessibility-service>
<accessibility-service
android:accessibilityEventTypes="typeViewClicked|typeViewFocused"
android:packageNames="foo.bar, foo.baz"
android:accessibilityFeedbackType="feedbackSpoken"
android:notificationTimeout="100"
android:accessibilityFlags="flagDefault"
android:settingsActivity="foo.bar.TestBackActivity"
android:canRetrieveWindowContent="true"
android:canRequestTouchExplorationMode="true"
android:canRequestEnhancedWebAccessibility="true"
. . .
/>
Public Constructors
Public Methods
public AccessibilityNodeInfo findFocus (int focus)
Find the view that has the specified focus type. The search is performed across all windows.
Note: In order to access the windows your service has to declare the capability to retrieve window content by setting theAccessibilityService_canRetrieveWindowContent property in its meta-data. For details refer to SERVICE_META_DATA. Also the service has to opt-in to retrieve the interactive windows by setting the FLAG_RETRIEVE_INTERACTIVE_WINDOWS flag.Otherwise, the search will be performed only in the active window.
Parameters
| focus | The focus to find. One of FOCUS_INPUT or FOCUS_ACCESSIBILITY. |
|---|
Returns
- The node info of the focused view or null.
See Also
public AccessibilityNodeInfo getRootInActiveWindow ()
Gets the root node in the currently active window if this service can retrieve window content. The active window is the one that the user is currently touching or the window with input focus, if the user is not touching any window.
Note: In order to access the root node your service has to declare the capability to retrieve window content by setting theAccessibilityService_canRetrieveWindowContent property in its meta-data. For details refer to SERVICE_META_DATA.
Returns
- The root node if this service can retrieve window content.
public final AccessibilityServiceInfo getServiceInfo ()
Gets the an AccessibilityServiceInfo describing this AccessibilityService. This method is useful if one wants to change some of the dynamically configurable properties at runtime.
Returns
- The accessibility service info.
See Also
public Object getSystemService (String name)
Return the handle to a system-level service by name. The class of the returned object varies by the requested name. Currently available names are:
WINDOW_SERVICE("window")- The top-level window manager in which you can place custom windows. The returned object is a
WindowManager. LAYOUT_INFLATER_SERVICE("layout_inflater")- A
LayoutInflaterfor inflating layout resources in this context. ACTIVITY_SERVICE("activity")- A
ActivityManagerfor interacting with the global activity state of the system. POWER_SERVICE("power")- A
PowerManagerfor controlling power management. ALARM_SERVICE("alarm")- A
AlarmManagerfor receiving intents at the time of your choosing. NOTIFICATION_SERVICE("notification")- A
NotificationManagerfor informing the user of background events. KEYGUARD_SERVICE("keyguard")- A
KeyguardManagerfor controlling keyguard. LOCATION_SERVICE("location")- A
LocationManagerfor controlling location (e.g., GPS) updates. SEARCH_SERVICE("search")- A
SearchManagerfor handling search. VIBRATOR_SERVICE("vibrator")- A
Vibratorfor interacting with the vibrator hardware. CONNECTIVITY_SERVICE("connection")- A
ConnectivityManagerfor handling management of network connections. WIFI_SERVICE("wifi")- A
WifiManagerfor management of Wi-Fi connectivity. WIFI_P2P_SERVICE("wifip2p")- A
WifiP2pManagerfor management of Wi-Fi Direct connectivity. INPUT_METHOD_SERVICE("input_method")- An
InputMethodManagerfor management of input methods. UI_MODE_SERVICE("uimode")- An
UiModeManagerfor controlling UI modes. DOWNLOAD_SERVICE("download")- A
DownloadManagerfor requesting HTTP downloads BATTERY_SERVICE("batterymanager")- A
BatteryManagerfor managing battery state JOB_SCHEDULER_SERVICE("taskmanager")- A
JobSchedulerfor managing scheduled tasks NETWORK_STATS_SERVICE("netstats")- A
NetworkStatsManagerfor querying network usage statistics.
Note: System services obtained via this API may be closely associated with the Context in which they are obtained from. In general, do not share the service objects between various different contexts (Activities, Applications, Services, Providers, etc.)
Parameters
| name | The name of the desired service. |
|---|
Returns
- The service or null if the name does not exist.
public List<AccessibilityWindowInfo> getWindows ()
Gets the windows on the screen. This method returns only the windows that a sighted user can interact with, as opposed to all windows. For example, if there is a modal dialog shown and the user cannot touch anything behind it, then only the modal window will be reported (assuming it is the top one). For convenience the returned windows are ordered in a descending layer order, which is the windows that are higher in the Z-order are reported first. Since the user can always interact with the window that has input focus by typing, the focused window is always returned (even if covered by a modal window).
Note: In order to access the windows your service has to declare the capability to retrieve window content by setting theAccessibilityService_canRetrieveWindowContent property in its meta-data. For details refer to SERVICE_META_DATA. Also the service has to opt-in to retrieve the interactive windows by setting the FLAG_RETRIEVE_INTERACTIVE_WINDOWS flag.
Returns
- The windows if there are windows and the service is can retrieve them, otherwise an empty list.
public abstract void onAccessibilityEvent (AccessibilityEvent event)
Callback for AccessibilityEvents.
Parameters
| event | An event. |
|---|
public final IBinder onBind (Intent intent)
Implement to return the implementation of the internal accessibility service interface.
Parameters
| intent | The Intent that was used to bind to this service, as given to Context.bindService. Note that any extras that were included with the Intent at that point will not be seen here. |
|---|
Returns
- Return an IBinder through which clients can call on to the service.
public abstract void onInterrupt ()
Callback for interrupting the accessibility feedback.
public final boolean performGlobalAction (int action)
Performs a global action. Such an action can be performed at any moment regardless of the current application or user location in that application. For example going back, going home, opening recents, etc.
Parameters
| action | The action to perform. |
|---|
Returns
- Whether the action was successfully performed.
public final void setServiceInfo (AccessibilityServiceInfo info)
Sets the AccessibilityServiceInfo that describes this service.
Note: You can call this method any time but the info will be picked up after the system has bound to this service and when this method is called thereafter.
Parameters
| info | The info. |
|---|
Protected Methods
protected boolean onGesture (int gestureId)
Called by the system when the user performs a specific gesture on the touch screen. Note: To receive gestures an accessibility service must request that the device is in touch exploration mode by setting the FLAG_REQUEST_TOUCH_EXPLORATION_MODE flag.
Parameters
| gestureId | The unique id of the performed gesture. |
|---|
Returns
- Whether the gesture was handled.
See Also
GESTURE_SWIPE_UPGESTURE_SWIPE_UP_AND_LEFTGESTURE_SWIPE_UP_AND_DOWNGESTURE_SWIPE_UP_AND_RIGHTGESTURE_SWIPE_DOWNGESTURE_SWIPE_DOWN_AND_LEFTGESTURE_SWIPE_DOWN_AND_UPGESTURE_SWIPE_DOWN_AND_RIGHTGESTURE_SWIPE_LEFTGESTURE_SWIPE_LEFT_AND_UPGESTURE_SWIPE_LEFT_AND_RIGHTGESTURE_SWIPE_LEFT_AND_DOWNGESTURE_SWIPE_RIGHTGESTURE_SWIPE_RIGHT_AND_UPGESTURE_SWIPE_RIGHT_AND_LEFTGESTURE_SWIPE_RIGHT_AND_DOWN
protected boolean onKeyEvent (KeyEvent event)
Callback that allows an accessibility service to observe the key events before they are passed to the rest of the system. This means that the events are first delivered here before they are passed to the device policy, the input method, or applications.
Note: It is important that key events are handled in such a way that the event stream that would be passed to the rest of the system is well-formed. For example, handling the down event but not the up event and vice versa would generate an inconsistent event stream.
Note: The key events delivered in this method are copies and modifying them will have no effect on the events that will be passed to the system. This method is intended to perform purely filtering functionality.
Parameters
| event | The event to be processed. |
|---|
Returns
- If true then the event will be consumed and not delivered to applications, otherwise it will be delivered as usual.
protected void onServiceConnected ()
This method is a part of the AccessibilityService lifecycle and is called after the system has successfully bound to the service. If is convenient to use this method for setting the AccessibilityServiceInfo.
AccessibilityService 官网介绍的更多相关文章
- hadoop官网介绍及如何下载hadoop(2.4)各个版本与查看hadoop API介绍
1.如何访问hadoop官网?2.如何下载hadoop各个版本?3.如何查看hadoop API? 很多同学开发都没有二手资料,原因很简单觉得不会英语,但是其实作为软件行业,多多少少大家会英语的,但是 ...
- vue3官网介绍,安装,创建一个vue实例
前言:这一章主要是vue的介绍.安装.以及如何创建一个vue实例. 一.vue介绍 vue3中文官网:建议先自己看官网. https://v3.cn.vuejs.org/ vue是渐进式框架,渐进式指 ...
- Gearman研习笔记(1) ------ 官网介绍要点摘录
之前的项目里使用过消息中间件(公司提供的MQ服务)来做分发,因为MQ是基于消息的,并不是专业的任务分发器,在一些复杂场景上使用起来并不恰当. 后来听组长说了下Gearman(听名字还以为是Ironma ...
- Nordic老版官网介绍(2018-11-30停止更新)
1. Nordic官网及资料下载 Nordic官网主页:https://www.nordicsemi.com/,进入官网后,一般点击“Products”标签页,即进入Nordic产品下载首页,其独立链 ...
- 跟着minium官网介绍学习minium-----(一)
某天,再打开微信开发者工具的时候收到一条推送.说是微信小程序自动化框架 Python 版 -- Minium 公测. Url如下: https://developers.weixin.qq.com/c ...
- 跟着minium官网介绍学习minium-----(二)
一: 进入minium官方文档 1. 进入minium目录然后运行服务,出现以下提示说明打开成功, 2. 浏览器直接运行http://localhost:3000即可看到效果. 3. 下图为进入网页后 ...
- python爬虫 beutifulsoup4_1官网介绍
http://www.crummy.com/software/BeautifulSoup/bs4/doc/ Beautiful Soup Documentation Beautiful Soup is ...
- 微软自己的官网介绍 SSL 参数相关
https://docs.microsoft.com/en-us/dotnet/api/system.security.authentication.sslprotocols?redirectedfr ...
- 跟着minium官网介绍学习minium-----(三)
注意:程序运行时在微信开发者工具当前页面为主,而不是每次运行都是从home页面开始 一 获取单个元素 get_element():在当前页面查询控件, 如果匹配到多个结果, 则返回第一个匹配到的结果 ...
随机推荐
- #423 Div2 D
#423 Div2 D 题意 构造一个 n 个节点的树,恰好有 k 个叶子节点 (叶子节点的定义是只与树上的某一个节点存在连边),要求任意两个叶子节点的距离的最大值最小,距离为两个节点间边的数量,输出 ...
- implements
implements 是实现某个接口的意思. 如果某个类 后面使用 implements,并指定了相应的接口,那在该类下面就需要实现相应接口的方法. 比如:接口interface java.lang. ...
- java.util.List.subList ,开区间和闭区间
比如集合中的内容为1,2,3,4,5list.sublist(2,4)就返回一个子集合:它的内容包括从下标为2到下标为4,而且这是左闭右开的就是说是从大于等于2到小于4那子集内容就是3,4(集合的下标 ...
- 把我的漫画浏览器后台程序迁移到GAE上了
这两天看了一下Python和GAE相关资料,作为练手,把我以前写的Windows 8下看漫画的程序的后台解析算法迁移到了GAE上了. 之前由于没有后台服务器,很多东西在本地实现起来不是很方便,现在拿G ...
- JavaScript传递变量:值传递?引用传递?
今天在看 seajs-2.2.1/src/util-events.js源码,里面有段代码不是很理解: var events = data.events = {} // Bind event seajs ...
- 手把手教你AndroidStudio多渠道打包
最近不断有朋友向我咨询AndroidStudio多渠道的打包方法,今天整理一下之前积累的打包套路,写一篇文章,手把手的教给大家. 说到多渠道,这里不得不提一下友盟统计,友盟统计是大家日常 ...
- 一个简单功能的SQL 实现
1.假设有一张表示cj表 Name Subject Result 张三 语文 80 张三 数学 90 张三 物理 85 李四 语文 85 李四 数学 92 李四 物理 89 要求查询结果: 姓名 语文 ...
- IO流知识点
如何判断是输入还是输出?答:以程序为中心.如何判断是解码还是编码?答:以程序为中心.程序只懂二进制,所以,以二进制转换成字符是解码,字符转换成二进制是编码.1. 首先,File 它是给程序跟文件或文件 ...
- Webpack打包工具学习使用
Webpack 是当下最热门的前端资源模块化管理和打包工具.它可以将许多松散的模块按照依赖和规则打包成符合生产环境部署的前端资源.还可以将按需加载的模块进行代码分隔,等到实际需要的时候再异步加载.通过 ...
- 深入理解ES6里的promise
一.ES6 Promise是什么? 复杂的概念先不讲,我们先简单粗暴地把Promise用一下,有个直观感受.那么第一个问题来了,Promise是什么呢?是一个类?对象?数组?函数? 别猜了,直接打印出 ...