Check and store connection speed and type of connection

Hi,

 

I’m just starting with mobile development and have a question in advance:

 

I would like to check the connection speed a user has and the type of connection. Edge, 3G, LTE? And how many kb per seconds?

 

Is this possible? Can I store this somehow and send the info to a server?