Internship project: Device to Device Transfer Android App

I tried out transferring forms using wifi.
Here is the link to the code.

I have used QRCode as a method to share connection information to connect the two devices.
One of the devices acts a Client and other as a Server.

Server creates a hotspot and accepts Socket connection.
The same device creates QRCode with the following information:

  1. SSID of network
  2. Password (will be used if the network is password protected)
  3. Server IP
  4. Port number (Port number is NOT hardcoded)

The other device(Client) scans the QR Code.
Connects to the hotspot.
Establishes a socket connection with other devices.

Main advantages of using QR Code is :
Connection establishment becomes very easy from the user point of view.
The user need not be aware of technical details. This will be a very big advantage. I shall share usefulness of QRCode in another post.

The app uses Content Provider to access form instances.
All the received forms are stored in /odk/instances/ folder.

Other than QRCode, I had used Network Service Discovery as a method for devices to discover each other. But, for NSD to work, it requires two devices running the same app instance on the same Local network. NSD is useless if two devices aren't connected to same Acess point. That means NSD will be helpful only to establish Socket connection and not Wifi connection. So, I think NSD is of little use here.

@LN @Shobhit_Agarwal Now, the connection over wifi is easy to establish and I have transferred forms along with associated files, can it be considered as a way to achieve peer to peer sync? (Although technically it is not a peer to peer connection)

1 Like

Just to keep everything in one place and accessible to everyone, here is the link to the app that uses Bluetooth for transferring forms using Content Provider.

It uses BluetoothSocket to transfer data using InputSteam and OutputStream.
All the logic for transfer remains the same irrespective of the use of Bluetooth/ wifi direct/ wifi.

1 Like

Hello I am a student from China, I viewed all the discussions here, as for a Divice-to-Divice Transfer under a no-WiFi circumstance, why not use SMS to sent forms to another device?

I know there are some issues to address when using SMS:

  1. SMS is inconvenient to transfer mass data like a bundle include: image , text , even some kind of media data.

  2. SMS needs to know the phone number of receiver before transferring, and it can just transfer to one person at a time( bluetooth also but I know there must be some approaches to share one file to multiple users at the same time such as WiFi )

Despite these disadvantages,SMS can work normally without WiFi network with a long distance. btw, I think SMS can also be a new feature that people can upload data to our server without a connection to internet.

This is my view about this issue, I think we can accept various options which can be chosen by the users to meet different requirements.I will work with this function and I'm glad that you guys visit my website: http://mickys.me or Github@huangyz0918

1 Like

Just made a simple UI (using Android native bluetooth share) for sending finalized forms via bluetooth. What do you think about it?

2 Likes

I would like to share my GSoC proposal draft.
Suggestions are welcome.:grinning:
https://docs.google.com/document/d/1XYTmUkoHXfbt-uiwqNeUKcPp59cLqMEur1LyGbh2mRs/edit

3 Likes

So many great ideas coming from everyone! It has been really cool to see the collaborative spirit here, in #internships and on the Collect repository.

Absolutely. I know @dexter21 has also been exploring along those lines. I believe it should also be possible to initiate wifi direct pairing with a QR code if that provides benefits.

There is some interest in adding support for SMS submissions which you can read about at Send submissions via SMS. For this particular project, the goal is to use a free transport layer that works well in close proximity. SMS can be very expensive in some locales and it can be unreliable.

The UI looks really nice! For the summer project the recommendation is to enable the functionality in a companion app to reduce needed changes to Collect and so that users who don't need the functionality won't be overwhelmed with a new feature. But this shows a nice path to integrating it.

4 Likes

@LN @Shobhit_Agarwal I've completed the first version of my Draft Proposal.
Please give your valuable suggestions.

https://docs.google.com/document/d/1nGsVjEr_Vc4fywn6yHKiLkR2kLcEz_VTJteVCrEnRfo/edit?usp=sharing

1 Like

Thanks a lot.
I have read this before I wrote my views here ,and some of my ideas also comes from that post.
I know here comes some issues related to the cost of transmission using SMS, but we still need that function when we are in a remote area without WiFi signal but have a strong need to sent some essential data to servers.

We can offer various options for users, which I mentioned in Send submissions via SMS - #6 by Mickys0918

In short, we can design a logic and build a algorithm help to improve the efficiency of data transmission, and make sure the data will be delivered into other devices nearby or remote successfully under every circumstance.

For example:

    switch (requirment) {
        case upload_to_remote:
            if (have_wifi) {
                use wifi transfer;
            }else{
                use sms transfer;
           }
            break;
        case share_to_nearby:
            use nfc || bluetooth || wifi hotspot;
            break;
        default:
            break;

It's really simple but I hope everybody can join and help to improve that, if you guys think we can use something like that :slight_smile:

PS: I am a student and I really interested in this project although I'm new here ~
And I'm trying to submit more code and address issues with this amazing APP whether I have a chance to work with you guys in GSoC 2018 or not.I'm really enjoy it!

1 Like

@Shobhit_Agarwal @LN I've completed my Draft proposal. please i need your suggestions. Thank you

1 Like

@LN @Shobhit_Agarwal I have completed my proposal draft, and open to your guys' suggestions ! :slight_smile:

2 Likes

Hi!

I have finished my draft proposal. Would you take a look and give me any suggestions please?
@Shobhit_Agarwal @LN

https://drive.google.com/file/d/1hu_mAZciaSSemAIU-e3dJ1ktaQTHAkcz/view?usp=sharing

1 Like

I have built two demos using WiFi to transfer data.
And wrote a brief introduction (README) about implements in WiFi Direct and WiFi Hotspot.
You can visit my Github for more details. :slight_smile:

https://github.com/huangyz0918/WiFi_Transfer

1 Like

@Shobhit_Agarwal @LN I have completed the draft of my project proposal. Please do have a look, and provide me with your valuable suggestions :slightly_smiling_face:

1 Like

Hi I'm a undergraduate from China and I really want to work with you guys during the GSoC 2018 !

I'm new here so there is a limited number of contributions I can do in such a short time. : (
I have addressed an issue the second day PR#2026 (need testing/reviewed) when I became a collaborator and I'm trying to get familiar with this project and do more contributions as fast as I can.I think it's easy for you to find out how enthusiastic I am toward this project. :slight_smile:

I almost fell in love with this idea (ODK Collect aims to collect data under various circumstances) right after I saw it at the organizations page of GSoC. As for me, I major in EECS (Electrical Engineering and Computer Sciences ) at ShanDong University ,China. And I have finished the course of MIT (MIT 6.01) in American during last summer vacation. The skill set for myself including Android, iOS, JavaScript and Git.

If you want to know more about me : Introduce yourself here! - #383 by Mickys0918

As for functions related to the ODK Collect Android project, after viewing and discussing with you guys here,I think we have several expected functions:

  • A supervisor app which can screen the forms submitted by users.
  • A security and convenient way for users to share data and push data which can be addressed by developing a device-to-device transfer feature
  • Material UI improvement : some logical design may confuse users and the UI/UX design still need a lot of work to do, we should start these work as soon as possible.

From my perspective, some extra features can be done with supervisor app project such as the remote transfer using WiFi Direct or SMS ,etc.I think I'm good at UI/UX design and building material-design ui in Android, if any mentor is good at this,I can follow you and open to your suggestions and guidance.

Here is my Email-Address: huangyz0918@gmail.com
I would be very appreciated if you chose me and contact with me, and I think we can talk about some interesting things about Chinese culture after the work, anyway it's glad to meet you guys and wish you have a good time.

Hi @Shobhit_Agarwal!
Will this project be a part of GSoC 2019?
Thank you!

Hi, this is the project in 2018, new projects will be published under this topic when mentors have new ideas. :slight_smile: