Reputation: 55
I want to write a program which downloads some data from Internet (PC part) and when my Android app will detect home Wi-Fi, it will request that data and PC part is send it to the phone.
How do I push data from PC to the Android over Wi-Fi? Is it possible?
Upvotes: 2
Views: 805
Reputation: 82
Set up a HTTP server on your PC, running your app as a service on Android device, once your Android app detect the Wi-Fi, get data from the PC.
Upvotes: 1
Reputation: 40884
If you already know the IP address of the computer on the local network, the best solution would probably be to write a network server that runs in the background on the PC, and the Android device would create a socket and connect to that server and exchange the necessary data.
Upvotes: 1