Android Question Need to read files from another tablet.

chuck3e

Active Member
Licensed User
Longtime User
I have 6 tablets that contain a quiz. The results of the quiz are stored on files within each tablet. The filenames contain the date the quiz was taken and indicates whether it was in English or Spanish. I need to be able to collect the files using only the common folder name and do an aggregate report on the results of the tests. I have been doing this by copying the files using a USB connection to a PC and executing a B4J app to produce the report. Now I want to use another tablet instead of a PC and use a B4A app.

Is it feasible to copy the files over a wi-fi connection?

o The files are 4k text files. Two files are created each day the quiz is taken, one in English and one in Espanol.

o The 6 laptops do not have access to Google Play or Bluetooth.

o I will know the IP addresses of each tablet.

Thanks for any encouragement you can give me.

-Chuck
 

chuck3e

Active Member
Licensed User
Longtime User
Erel,
I tried the FileTransfer app on a tablet that has both Wi-Fi and Bluetooth capabilities but using wi-fi it fails on a "Connection Refused" error. The IP address I plugged in for Wi-Fi was the address of the tablet I was trying to get the file from. Is there something I need to do on the tablet I'm trying to read? Is it failing a password test on my router?

Also, on another issue, I tried the transfer app on a tablet that does not have BlueTooth capability and it fails to run on this line:

B4X:
Dim pairedDevices As Map = serial1.GetPairedDevices

It gets an error on line 52, "NullPointerException"

I assume, if I want to use that tablet as the reader, I can work around this by deleting all references to BlueTooth in the FileTransfer app's code.

-Chuck
 
Upvote 0

chuck3e

Active Member
Licensed User
Longtime User
Erel,
I had not successfully run it on both tablets. In its initial state the BlueTooth logic would fail on the tablet that did not have BlueTooth capability. I was able to comment out all references to BlueTooth in the code and install it and run it on both tablets successfully.

However, it appears that the transfer "pushes" the files to the other tablet rather than "pull" the files. If this is true and the only way this will work, the problem is that I have to sit at each of the six "satellite" tablets one at a time and push the files to the "Master" tablet. I was hoping I wouldn't have to do all that running around. Actually, I was hoping all I had to do was just turn on the other tablets. However, I suppose my ideal would cause all kinds of security issues.

Thanks for your help, though. This is a great transfer tool and remarkably fast. I will keep using it for a while to see if it is really better than the USB connection method. One plus is I won't need to lug a laptop around but then they're getting smaller, too.

One more question. You say "The folder can be changed by setting the StreamFolder field" but I don't know where that is. I don't find that name in the FileTransfer code.

-Chuck
 
Upvote 0

chuck3e

Active Member
Licensed User
Longtime User
Erel,
Forgive me. I said I couldn't find StreamFolder but now I have. Thanks for not scolding me, as it was right under my nose.
-Chuck
 
Upvote 0
Top