I am relatively new to Android. I have a very basic confusion in the functionality of 2 APIs which are used for network communications in Android.
- openConnection()
- connect()
From conn.connect() it appears that connect() is what actually creates the connection.
While from url.openConnection() it appears that openConnection() actually creates the connection.
From some discussions around the topic on SO, conn.connect() supports the former, with 4 upvotes for the answer while url.openConnection() supports the latter, with 97 upvotes for the answer.
Can someone please help clear the confusion ?