open-source-ideas / ideas

💡 Looking for inspiration for your next open source project? Or perhaps you've got a brilliant idea you can't wait to share with others? Open Source Ideas is a community built specifically for this! 👋
6.52k stars 222 forks source link

Android File Sharing Library #25

Open karuppiah7890 opened 7 years ago

karuppiah7890 commented 7 years ago

Project description

I created a simple Android App to share files within a WiFi LAN between two mobiles, where one mobile creates a hotspot and the other connects to it and the network is formed and the files are shared.

It was a very basic App, so I wanted to upgrade it. I had created a music player by learning from a tutorial and then upgraded my basic App to one, where people can share music files through my App and listen to the music in the same App. Best part is, in your phone, you get to see the list of music files in your friend's phone and when you think you like one of the songs in the list, you can click it, and only then the song will get downloaded (to your phone) and then it will play automatically. And your friend use other apps in her phone while these files are being shared and you can also use other Apps while listening to these songs.

Later when I wrote about how ShareIt probably works in my Quora Answer based on my experience on creating a File Sharing App, I found that many people want to know how it works and found that there are almost no Open Source Apps for it. So, now I want to create an Android File Sharing Library, which can be used by people who want to add File Sharing facility to their App. And I want to make this library Open Source. Also, I am planning to use this library in my Music App that I mentioned above and make that Music App Open Source too, may be. For now, it's in a private repository.

I am gonna start the work soon on this. But before that, I wanted to follow some best practices to use in the library. Like what Android Components to use, and use the most appropriate ones. I put up a post about this here. But it didn't help me much. And I was asking it for my App. I think my Music App's code isn't efficient, so I put up this Q. So, when I create this library that I am talking about, I will replace the code in my Music App with this library usage.

I need some Android Experts, who are good in networking, who can work with me on this Library. Comment here, and we can discuss about it and I will show you my File Sharing code that I used in my Music App and show the whole App code too.

Relevant Technology

Platform : Android Language : Java Concepts to know : Networking. Socket Programming in Java

But it's fine if you don't know the concepts. I can help you. And link you to articles based on them. But it would be good if you have some knowledge in Android. It's very necessary, because I am not an expert in Android.

Who is this for

Everyone is welcome. And Experienced Developers and Novice developers are needed. Beginners are welcome if they are interested in networking and connected devices. [ It's fine if you don't know networking. We can help! We are all here to learn! ]

It has much work!

karuppiah7890 commented 7 years ago

I have started with a basic version of the library. You can have a look at it here : https://github.com/Android-File-Share/FileShare

Manikkumar1988 commented 5 years ago

@karuppiah7890 is this still Active?

FredrikAugust commented 5 years ago

@manikkumar1988 based on the commit history, I'd say no. If you want to give it a go, let me know, and I'll help as best I can :)

Manikkumar1988 commented 5 years ago

@FredrikAugust yup, Im interested to kick start this side project. Shall I create my own repository and have link posted here?

FredrikAugust commented 5 years ago

Don't worry about it, I'll setup a team and repo for you under this org @Manikkumar1988. Just give me two minutes and it'll be up! :+1:

FredrikAugust commented 5 years ago

@Manikkumar1988 Done! I've invited you to the team, and the repo is set up :) Let me know if I can be of assistance.

karuppiah7890 commented 5 years ago

@Manikkumar1988 Like @FredrikAugust correctly mentioned it's not active. Not sure if I will be continuing on the repo or the idea later, but I would love to see it come alive again. But if I try again, I might try differently with easier and better abstractions that are less error prone, instead of writing very low level threads and tcp code. At least use some libs and even check existing protocols. You can think on more about the different ways you can implement it 😄

Manikkumar1988 commented 5 years ago

@karuppiah7890 can you point any reference to on which technology to choose first for transferring

I went through your articles, you seem to much concerned about handling long operations on non-UI thread (thread or service or handler thread). Android Platform is now mature enough that we have viewmodel, work manager which eases handling these tasks.

Now my concern how to transfer the file?

Manikkumar1988 commented 5 years ago

After much reading about P2P and enabling the same using tech stack available on Android platform, found below components: Using Wifi: Wifi P2P Wifi Aware

Using NFC

Hybrid, Nearby API

Bluetooth

and on low level socket programming, TCP/UDP, is available!

karuppiah7890 commented 5 years ago

Your ideas are your limit. You can create a library that can cross compiled to a statically linked library and be used in Android, iOS and more and you can form clusters and what not. Think in terms of distributed systems may be?

And about threads, oh, I didn't know. I used to do Android long ago, and there were lot of UI features that I saw when I was learning, but I didn't see much of these and my Java knowledge isn't great. But if you can use the new stuff with better abstractions, robustness and performance, good for you :)

And I actually used TCP socket programming. I don't know about the others, WiFi direct - I have seen people connect two devices with it, not sure if you can do clusters. But with simple WiFi hotspot, you can form an internal network and have a cluster :)

On Wed, Aug 15, 2018, 3:40 PM Manikkumar notifications@github.com wrote:

Some questions that pops on top of my mind is that, does this library can be limited only to Android powered devices or can it be used among other devices like iDevices, linux/windows powered machine?

Does the sharing involves only two devices or can it be cluster as well?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/open-source-ideas/open-source-ideas/issues/25#issuecomment-413153294, or mute the thread https://github.com/notifications/unsubscribe-auth/AMNw6G1YbsRqdgB7HoGp5HQf3FHXM3_wks5uQ_OIgaJpZM4Kf4sB .