Sinan Tuzcu Well-Known Member Licensed User Longtime User Nov 7, 2024 #1 Hi, Hello, My app works perfectly on Android version 9 and older. However, starting from version 14, an issue occurs that causes the app to crash. I would appreciate support in solving this problem. B4X: Dim socket As JavaObject = r.GetField("socket") Dim jo As JavaObject = Me jo.RunMethod("setKeepaliveSocketOptions", Array(socket, 1000, 1000, 3)) I didn’t have any problems with this on Android 9.
Hi, Hello, My app works perfectly on Android version 9 and older. However, starting from version 14, an issue occurs that causes the app to crash. I would appreciate support in solving this problem. B4X: Dim socket As JavaObject = r.GetField("socket") Dim jo As JavaObject = Me jo.RunMethod("setKeepaliveSocketOptions", Array(socket, 1000, 1000, 3)) I didn’t have any problems with this on Android 9.
Erel B4X founder Staff member Licensed User Longtime User Nov 24, 2024 #21 This is a private API. Google doesn't want you to call it. You will need to find a workaround, for example send a "ping" message every X seconds. I run many apps with network communication that run for very long periods without any issue. Upvote 0
This is a private API. Google doesn't want you to call it. You will need to find a workaround, for example send a "ping" message every X seconds. I run many apps with network communication that run for very long periods without any issue.
Sinan Tuzcu Well-Known Member Licensed User Longtime User Nov 24, 2024 #22 @Erel , can you show me an example that I can take a look at? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2024 #23 What are you communicating with? Upvote 0
Sinan Tuzcu Well-Known Member Licensed User Longtime User Nov 25, 2024 #24 I establish a TCP/IP connection with a hardware device. Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Nov 25, 2024 #25 You need to find a packet that you can send and will not do anything and then send it with a timer every X seconds. Upvote 0
You need to find a packet that you can send and will not do anything and then send it with a timer every X seconds.