iOS Question Trapping HOME or POWER button press?

Arf

Well-Known Member
Licensed User
Longtime User
Is there any way I can trap a HOME or POWER button press in B4i, and use it as a control to close a page?

Or alternatively, change the timings of the LongClick event on panels so that the trigger time is way longer (like 2 seconds or so)?
 
Last edited:

Erel

B4X founder
Staff member
Licensed User
Longtime User
Is there any way I can trap a HOME or POWER button press in B4i, and use it as a control to close a page?
The app will move to the background. You cannot change this behavior. Application_Background event will be raised.

Or alternatively, change the timings of the LongClick event on panels so that the trigger time is way longer (like 2 seconds or so)?
You cannot change the LongClick timing however you can implement your own "long click" event by handling the touch event.
You can use CallSubPlus for this. Call a sub after x milliseconds when the action is DOWN. Store the current action in a global variable. When the sub runs check whether the action is still DOWN or MOVE.
 
Upvote 0
Top