0

I know how to write to a file in internal storage of the Android device, but i need to write to file in my computer for communicating with server in my computer by files communication.

Second, Is it possible for server which runs on my pc to write to an android device which is connected by usb to my computer?

The issue is that i have to simulate communication between android phone and server in my computer,in which both communicate by files. Thanks,

Sharon182
  • 100
  • 1
  • 3
  • 10
  • No, the device cannot create files on the PC, but you can create something that will run on your PC and handle such requests from something you create which runs on the device. – Chris Stratton Aug 21 '14 at 21:43

1 Answers1

0

You can use ADB to write from the device:

Execute adb commands from java

And using ADB from the machine to the device:

how to use adb command to push a file on device without sd card

Hope that helps with your simulation.

Community
  • 1
  • 1
Jim
  • 10,172
  • 1
  • 27
  • 36