我的应用程序可访问服务无法正常工作,如果我重新安装我的应用程序

我的应用程序可访问服务无法正常工作,如果我重新安装我的应用程序

问题描述:

如果我没有设置下做辅助服务选项取消选中的辅助服务没有与我的应用程序绑定 - >辅助我卸载我的应用程序之前,

Accessibility Service is not binding with my app if I not doing uncheck of Accessibility Service option under Settings -> Accessibility before I do uninstall my app.

请注意:
为了让它再次工作,我需要重新启动我的电话

Note: To make it again work I need to restart my phone

任何一个可以请建议我如何安全地重新安装我的应用程序,而无需禁用无障碍服务

Can any one please suggest me on how to safely reinstall my app without disabling Accessibility Service

我成功在重新安装该服务,而这是启用(并继续接收之后的事件),调整服务设置后。

I was successful at reinstalling the service while it was enabled (and continue receiving events after that), after tweaking the service settings.

我改的的android:packageNames =com.example.android.apis的(得到这个从教程)插入的的android:packageNames =@空

I changed android:packageNames="com.example.android.apis" (got this from tutorials) into android:packageNames="@null"

截至今天我在XML配置部分(JB):

As of today I have in the xml config part (for JB):

<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
    android:description="@string/accessibility_description"
    android:packageNames="@null"
    android:accessibilityEventTypes="typeNotificationStateChanged"
    android:accessibilityFlags="flagDefault"
    android:accessibilityFeedbackType="feedbackGeneric"
    android:notificationTimeout="100"
    android:canRetrieveWindowContent="false"
/>

和在Java部分(pre-JB,在服务的的 onServiceConnected()的):

and in the Java part (for pre-JB, in service's onServiceConnected() ):

    AccessibilityServiceInfo info = new AccessibilityServiceInfo();
    info.feedbackType = AccessibilityServiceInfo.FEEDBACK_GENERIC;
    info.eventTypes = AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED;
    info.notificationTimeout = 100;
    info.packageNames = null;
    info.feedbackType = AccessibilityServiceInfo.DEFAULT;
    this.setServiceInfo(info);

我希望这可以用你自己的情况下,帮助...

I wish this can help with your own case...