Sending datas to any wifi device(Smart switch) from a mobile phone through wifi

325 views Asked by At

I am trying to build an application that controls the smart switch wifi device. As far now i have created an app that lists the nearby wifi networks (it even displays the wifi signal of the smart switch device) and connects to them. I need to know the basic syntax to send any data to at least switch on or off the device from the app. Also please let me know about any APIs that can be used.

1

There are 1 answers

2
Prashant Bhoir On

For Sending Data between connected wifi device, you have to use socket programming. Below link showing the example for sending data

https://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/