I am new to Android and this is my first app. I would like to know how to read a log file from a remote machine. I tried the following using IP address but that did not seem to work:
try
{
URL url = new URL("`http://10.0.161.72/C:/adsb.log`");
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()))
//...
}
The file can also be accessible via a network drive. I tried the following code and it worked in Java but not android.
try
{
File file = new File("T:\\AN\\3.00\\adsb.log");
BufferedReader br = new BufferedReader(new FileReader(file));
}
If I copy the log file and place it in the assets folder of my android project, I am able to read the file. But I want to access it from the network drive or remote PC as the log file will eventually be updated every few seconds and I have to read it continuously.