Android Question NetworkOnMainThreadException problem. How I can continue?

Paolodc

Member
Hello experts!
Can anyone tell me why when my application is released it can't connect to the database? I'm using the JdbcSql library and the connection happens under my private network. However, with debugging it manages to connect. The problem is as follows: (NetworkOnMainThreadException) android.os.NetworkOnMainThreadException.

What is the problem and how can I solve it?
 

Paolodc

Member
Thanks Erel.
I am not using the asynchronous methods for the moment because I am testing the app. Then when the code is ready I proceed with adding the server and asynchronous methods.
 
Upvote 0

Paolodc

Member
App permitts utents to connect to database. I think that to use async methods I must create a serverSocket. It isn't?
 
Upvote 0
Top