Sending information between PC (Windows Form, C #) and Android [closed]

3

I started to draw up a project schematic, and as an idea I had to have several Androids devices sending data to a computer (I plan to do it using Windows Form - C #, and maybe Xamarin for the Mobile part).

I ended up wondering how best to send the data (Bluetooth, Wi-Fi .. since I've never done anything like it before).

Could anyone help me out with the way it would be best (minor drop in connections to the computer)?

Thank you all: D

    
asked by anonymous 02.01.2018 / 04:43

2 answers

1

The best solution is to expose an API (it can be in your Forms application) so you can use NancyFX , or create an API project separately.

InthisAPIyouwillhaveEndPointsandbytheapplicationinXamarinyoucancalltheseendpointstosend/receiveinformation(GET/POST/PUT/DELETE).

ThisoperationcanbeviaWifioryoucanexposethisalsoontheWeb(youmustconfigureDMZorNATforyourlocalnetworkcomputerthatiswiththeapplication).

Usefullinks:

XamarinForms-ConsuminganASP.NETWebAPIwithHttpClient

link

Consuming a RESTful Web Service

link

In my GitHub you have an example WebAPI that can be used as the basis for your project too:

link

    
02.01.2018 / 09:06
1

If you want to do something broad, have access to multiple computers and few requirements, I recommend using Wi-Fi. So, you can work using and you do not need to use any third-party APIs to send / receive this information.

The use of Wi-Fi would be for both external and local access, using the local network to emulate all information collected. To do something external (which does not use LAN), it would be necessary to host a server application in a public address for the mobile applications to send the information to this server.

Loss of information on Wi-Fi is caused when the transmission is intercepted by metals, long distances, etc.

Using Bluetooth gets more complicated, it would have to make Win32 calls and few computers have a Bluetooth sensor. Unless you are doing this for a group of computers with specific Hardware whose sensor you will need to do a good installation, because what influences the loss of Bluetooth data is practically the same as Wifi.

For me, using Wi-Fi local area network is the most effective.

    
02.01.2018 / 11:47