Now implement LAN file sharing feature in your Android App using FileShare library with ease!
The library is published in the jCenter repository. So you just add this in your App's build.gradle
file, in dependencies
:
compile 'io.github.karuppiah7890:fileshare:0.1.0'
See the API Usage Wiki page
FileSharer is a Demo App that is built using FileShare library. You can see the source code in the FileSharerDemoApp folder. The APK for the Demo App is available in the releases.
I am yet to do some automation. These are the steps to use the App and to see how the Demo App works based on FileShare
Install the App in two Android devices.
In Receiver device :
- Create WiFi hotspot
- Open App
- click "Get File"
- The app should show a code on top of the button. And say "Listening" as a Toast
In Sender device :
- Connect to hotspot created by receiver
- Open App
- Type the code you saw in Receiver device
- Click "Pick File and Send"
- Pick a file (only docs can be picked) and select Done on top right
The file should get sent and you will see Toast messages accordingly in between for "Connected" , "Sending file", "Receiving file" etc in the two devices and finally the Receiver device will also show the location of the stored file as a Toast
The library is available under MIT License