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.
Asked
Active
Viewed 268 times
1 Answers
0
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/

Prashant Bhoir
- 900
- 6
- 8
-
thanks! I went through the above link, but in my case the sender will be a mobile and receiver is a hardware device with an inbuilt WiFi. i need to send some datas to switch on or off the device. i googled a lot but could not even find any syntax regarding this. – Rakesh Polo Dec 27 '16 at 04:59
-
I find myself in the same situation here, did you find anything of interest here? My intuition tells me that the device owner has to expose some API to connect to their device. Wemo Wi-Fi Smart Light Switch for example have an app to control their switch. Where did you get that smart switch? – Mazolo Aug 29 '17 at 03:46