• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

Sending over WFi

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey guys,

I am new to android development and I am trying to find out how to send files over WiFi. I have failed to find any tutorials on the topic and was hoping you could help or point me in the right direction.

Regards
Mike
 
Rancher
Posts: 43076
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What do you mean by "send files" - what protocol do you intend to use? If you're talking about an HTTP file upload, then I think there are versions of Apache HttpClient for Andoid out there.
 
Mike Brooks
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey what I was planing on doing was using HTTP in a program to send a file to another phone which would use HTTP to receive.

What I'm not sure on is if you can use sockets to send a recive files between androids phones. Or is there a better way to do this.

Regards and Thanks
Mike
 
Ulf Dittmer
Rancher
Posts: 43076
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the receiving phone have a static IP address? It would need to have one in order to be reliably addressable through TCP/IP. But somehow I doubt that most (or any) phones have that.

Maybe you could compose an MMS that contains the file contents? MMS are something that phones know how to send and receive; I foresee a lot less problems that way than if using HTTP.
 
Mike Brooks
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Would it be possible to do using bluetooth and if so is there any good tutorials on the topic. I just thought it would better due to the higher speed to send between phones over 802.11.

Thanks
Mike
 
Ranch Hand
Posts: 15304
6
Mac OS X IntelliJ IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I haven't dug deep into 2.0 to see what is new, but previously, this wasn't something google provided in the SDK (file transfer over BlueTooth), however, this site looks like it has some promise:

http://www.androlib.com/android.application.it-medieval-blueftp-qAFE.aspx
 
Saloon Keeper
Posts: 26768
190
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sending files via Bluetooth is commonly done via OBEX, which, alas, Android 1 doesn't support. Google has improved Bluetooth for Android 2.0, but it's unclear as to how extensive the improvements are.

Another alternative would be PAN. Fedora 10 (Linux) automatically adds a bluetooth PAN device to the collection of network devices when it detects Bluetooth hardware (I'm using a dongle). However, I'm not optimistic that my current handset can run tcp/ip via Bluetooth.

When you network two computers (for networking purposes, a phone is a "computer", too), the normal mode of operation is that the network stack selects the interface(s) that it deems most suitable. This can be based on whether a path from one computer to the other is physically available and how "expensive" it is. You don't normally open an interface, you open a connection. So whether the phone opts to go via WiFi, the carrier's own data services, or both can vary. But the point is, since all that is transparent, the app doesn't need to worry about it.
 
All of the world's problems can be solved in a garden - Geoff Lawton. Tiny ad:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic