Thanks for info, it is definitely a good start, but I am not sure how to use this code with B4A. The first article is mainly referencing Java code, and I guess the code is needed for android 4.1 and lower. Also the first article provides a link to a second way of doing it, provided that the app is using google play service. According to the second link https://blog.dev-area.net/2015/08/17/protect-your-android-app-against-ssl-exploits/, the only code needed in this case is:
Thanks again for your feedback. I looked at @Erel code and I was trying to understand if this guarantees TLS V1.2 and above on older android versions or not.
I was unable to find a reference yet. Do you know anything about it?
Another interesting thing that I saw:
based on the original links that you provided, the author mentioned to call the code in the first activity
The way to test this would be to connect to a server that only provides tls 1.2. As to a guarantee, that may be difficult. As posted in a link above, the server should pick the strongest security that a client can handle. If the server does not do it’s job right, connections may happen at a lower security protocol.