android - ToggleButton onTouchListener not working after screen on -


I have a PTT application where, if I should turn receive a call off my screen and activity bring it Working, however, if I try to press and hold ToggleButton in this activity, it will only listen to the first touch and act as ACTION_UP event never happens. Is how it is implemented PTT onTouchListener:

  pushToTalkButton.setOnTouchListener (New OnTouchListener () {@Override see public boolean onTouch (V, MotionEvent event) {int action = event.getAction () ; If (action == MotionEvent.ACTION_DOWN & amp; activeCall == tap) {initiateCall ();} else if (action == MotionEvent.ACTION_UP & amp;! ActiveCall = null) {endCall () ;} Return false;}});  

This is the reason why any thoughts on what is happening?


Comments