A Almog Active Member Licensed User Mar 27, 2018 #1 Hi I need that when my app in open the phone will not turn of automaticly(after a few minutes) and stay logged on. does someone knows how can I do that? Thanks
Hi I need that when my app in open the phone will not turn of automaticly(after a few minutes) and stay logged on. does someone knows how can I do that? Thanks
BillMeyer Well-Known Member Licensed User Longtime User Mar 27, 2018 #2 Look Here: https://www.b4x.com/android/forum/threads/wake-state-app.82179/ Should do the trick Upvote 0
A Almog Active Member Licensed User Mar 27, 2018 #3 OK, its written that I need to write PhoneWakeState.KeepAlive in the phone library, I am new to b4a, you can please explain how can i do that? thanks Upvote 0
OK, its written that I need to write PhoneWakeState.KeepAlive in the phone library, I am new to b4a, you can please explain how can i do that? thanks
A Almog Active Member Licensed User Mar 27, 2018 #4 ^ BillMeyer said: Look Here: https://www.b4x.com/android/forum/threads/wake-state-app.82179/ Should do the trick Click to expand... Upvote 0
^ BillMeyer said: Look Here: https://www.b4x.com/android/forum/threads/wake-state-app.82179/ Should do the trick Click to expand...
BillMeyer Well-Known Member Licensed User Longtime User Mar 27, 2018 #5 Ok - in this forum, the rules are that you try something on your own first and then when you hit a snag, we will try and help. If you do not do this you will end up not learning, but always relying on others to achieve your goals. This time I am going to break the rules to get you started. Firstly, on the right of your IDE, you need to select the Libraries Manager (at the bottom) and then look for the "Phone" Library. Once you have done this the "Phone" library becomes available for use. Now in your Sub Globals you need to add this Code: Dim pws As PhoneWakeState Then, in Sub Activity_Create....., add this Code: Sub Activity_Create(FirstTime As Boolean) pws.KeepAlive(True) ' Will keep the phone in wake state with a bright screen End Sub My next recommendation - work through these - they will bring you to speed very, very quickly https://www.b4x.com/android/forum/threads/b4x-erel-teaches-programming-video-tutorials.88787/ Enjoy !! Upvote 0
Ok - in this forum, the rules are that you try something on your own first and then when you hit a snag, we will try and help. If you do not do this you will end up not learning, but always relying on others to achieve your goals. This time I am going to break the rules to get you started. Firstly, on the right of your IDE, you need to select the Libraries Manager (at the bottom) and then look for the "Phone" Library. Once you have done this the "Phone" library becomes available for use. Now in your Sub Globals you need to add this Code: Dim pws As PhoneWakeState Then, in Sub Activity_Create....., add this Code: Sub Activity_Create(FirstTime As Boolean) pws.KeepAlive(True) ' Will keep the phone in wake state with a bright screen End Sub My next recommendation - work through these - they will bring you to speed very, very quickly https://www.b4x.com/android/forum/threads/b4x-erel-teaches-programming-video-tutorials.88787/ Enjoy !!