Here is my code inside accessibility service
" if (isLongPressEnabled && event.eventType == AccessibilityEvent.TYPE_VIEW_LONG_CLICKED) {
event.source?.text?.let { text ->
highlightText(event.source!!)
speakWithRateLimit(text.toString())
}
}" and here is my button inside mainactivity " binding.mySwitchfb.setOnCheckedChangeListener { _, isChecked ->
saveSwitchState("switchfb", isChecked)
Log.d("SwitchState", "isEventEnabled: $isChecked")
}" want to on/off the event by button click. Suggest me with your tasted code.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744213098a4563428.html
评论列表(0条)