Janusz Chmiel
Member
Dear B4A programmers, dear founder of B4A,
I have tried to adapt several pieces of codes available on this forum to allow Me to use mi Proximity sensor to initiate speak time when my screen is turned off. I have allready successfully tried app on Activity. Sensor react as it should, and app speak current time. But when I have turned The screen off, app did not speak The time.
So I have tried to implement working in background when device screen have been turned off by using service.
Result is very unpleasant.
When I put my hand near of The Proximity sensor and my screen is turned on, app auto terminate and focus get in to home screen.
When The screen have been turned off, crash of app do not occur, but sure, app do not speak The time.
So app speak only when code resides in A activity, very probably also in B4X pages.
Why I want this background app?
Because I want to save The life span of hardware button on my phone which I must press to get iinformation about The current time.
Modern phones are very non easy to repair at home, changing hardware buttons is very un easy.
Thank you for your help.
I have tried to adapt several pieces of codes available on this forum to allow Me to use mi Proximity sensor to initiate speak time when my screen is turned off. I have allready successfully tried app on Activity. Sensor react as it should, and app speak current time. But when I have turned The screen off, app did not speak The time.
So I have tried to implement working in background when device screen have been turned off by using service.
Result is very unpleasant.
When I put my hand near of The Proximity sensor and my screen is turned on, app auto terminate and focus get in to home screen.
When The screen have been turned off, crash of app do not occur, but sure, app do not speak The time.
So app speak only when code resides in A activity, very probably also in B4X pages.
Why I want this background app?
Because I want to save The life span of hardware button on my phone which I must press to get iinformation about The current time.
Modern phones are very non easy to repair at home, changing hardware buttons is very un easy.
Thank you for your help.