flyweb / flyweb-android

Android app for flyweb
2 stars 0 forks source link

Implement file-sharing use case in Android app #9

Open kannanvijayan-zz opened 7 years ago

kannanvijayan-zz commented 7 years ago

Add the ability for the FlyWeb android app to allow the user to share files with others by implementing an embedded FlyWeb server in the app, which advertises a file-sharing service.

The scope of work for the project is as follows:

  1. Add an embedded webserver to the app. Nanohttpd and unirest have been proposed as options. We need to pick one.
  2. Add the ability to advertise FlyWeb services to the app. Currently the mDNS logic in the app only supports discovery. However, supporting advertising should be simple. We should be able to just use the built-in android APIs, but there's a risk that they may be poorly implemented as it was for the Android mDNS discovery APIs. If so, then we need to update the app's home-rolled mDNS discovery code to also support advertising.
  3. Add to the app a UI component that allows users to activate the "share files" use case. This should be a button in the UI that when clicked, prompts the user to select a file to share (we can worry about multiple-file support later, after landing the single-file case)
  4. Write a nice-looking web-page to send to the FlyWeb clients. It should be as simple as possible, but aesthetically pleasing. The page should be written in some HTML templating language that allows us to generate the actual page by instantiating the template with the information of the file to be served.
  5. Write a class that takes a file as constructor, and starts a HTTP server on a random port, and advertises a FlyWeb service, serving up the above web-page.
  6. Write HTTP server handlers for the "download" URL handler which fetches the file data and sends it as the response.
kannanvijayan-zz commented 7 years ago

@irenewchen Hey. Sorry for the super long delay in writing this out. It took a little bit longer than expected for me to square away the set of circumstances surrounding our recent strategic change.

I think the above comment covers all the components of the implementation. Let's talk, make new issues for each individual issue, prioritize and organize the work plan, and implement, shall we?

irenewchen commented 7 years ago

@kannanvijayan

Would you be available to chat through IM rather than Hangouts today? Didn't bring my earphones with me. Any time before 2PM PST is good.

Forgot to reply regarding NanoHttpd and unirest, sorry about that! I think they will both serve our purpose, but since you have experience in Nanohttpd and know it is good, it might be better to go with that one.