Android to PC data exchange via adb - android

I've written an android application which reads database through the content providers. And now I want to display the database in a PC program. How can my PC program get the data gained by the android application? In other words, how to do data exchange between Android and PC via adb?
Thanks in advance!

Go in DDMS perspective, then open the File Explorer, there you can find data directories of the applications and system. Navigate to /data/data/you-package-name/databases, the click the Pull out file from the phone icon, save it wherever you want on your PC.

Android will not let you send files from device to PC using ADB. You can use adb pull to get files, but there isn't a way for the device to push. It would be easier to make a simple TCP client/server setup that would send data via WiFi or 3G. If you really need to use USB, you may be able to use the new USB APIs in Android 3.1.

Related

How see data on bluetooth?

I have created an an app on my android, it connect to my PC with bluetooth, this app send data via bluetooth.
How can I see this received data on my pc?
I use dont use a plug module on my pc it's the incorporate bluetooth, so he dont have a serial port
I have try find on google but all speak of transfered file.
Probably the easiest way would be to open up a terminal on the PC that has an open connection to the appropriate COMM port (physical or virtual). If you have this connection open you can then see any data that comes in and accordingly can send data back out.
Basically, on either end you have a bluetooth connection. That is a replacement for a cable in essence. Assuming you are using a serial port profile this will allow bytes of data to be sent back and forth over Bluetooth. I believe you are at that stage.
The port on your PC receives the data but has no means of displaying it. An application such as 'SERIAL' for Mac OS, HyperTerminal or similar for Windows will be what you need to see the data.
Hope this helps. Good luck.
(Another way would be to write an application that interfaces to the serial port on your PC but, I wouldn't think that would be worth your while... the terminal application is what you need) :)
This website has a list of useful applications that will help you.
http://www.usconverters.com/index.php?main_page=page&id=15&zenid=4835fe9edad4ba7966f4cf6533711315

Communicating between Android phone and Computer

I'm trying to create an android app which can access my computer's screen and file directory structure over the network.
A simple way would be to create a server running on my computer's localhost and to access it using my smartphone. But one question here is, would I be able to create a native Android app to access this, or would I be restricted to the browser?
Any other methods of achieving this that you would recommend? Maybe a way to SSH from my phone to my Ubuntu PC? Something else?
You can try using TCP Socket. Example: Create an application on PC use C# language, open port 8888 (ex: 192.168.1.200:8888). Then create an android app connect to 192.168.1.200:8888. OK. Some functions the same with FileZilla. When Android app sent command 'C:\ ls' to PC app. It returns a list directories in C:\ and send back again android app...When user double click in a directory (ex: Users) in android app, it will sent command 'cd Users' to PC app...
Hope it help you

Create application to connect with computer

I want to create application which I want to use to turn off my computer. I think about connection phone with computer in WIFI. But I don't know how can I send commend to computer and how computer translate this commend and turn off computer. Can you show me the way how can I start and what I should to know to create application like this?
You can achieve that with the client/server paradigm. You'll need to develop an android app that will work as client and a pc app that will work as server.
On the server side you need to wait for two commands:
Discover: Used for the client to know what servers are available
Action: Used to let the server know that it must shutdown itself

How to receive data on my Computer from an android application

I have to connect my Android device to my computer via internet connection. How do i go about doing it?
Create a webservice which the application talks to? ( But how to receive the data from webservice on my computer? )
You are on the right track. Look up REST APIs. You can either run the web service in the cloud somewhere and let both the Android and the PC connect as clients, or you can put a LAMP stack on your PC and run the web server and database right there.
If you allow direct USB connections, then you can also get the data off using ADB or Android File Transfer, without even using your app directly.

android accesses database server without wireless

So I need to develop an android application with a SQL_Lite db. Several times a week there must be a synchronisation between androids DB and a MySql BD located on WAMP server.
The condition is that this sync must be done when the android device is docked to a "docking station".
How can I transfer data from my android application to mysql DB without using the wireless option?
Thank you for your suggestions
You can use ADB tool from android SDK. It would however require enabled application development on all phones and installed development drives on docking station. Then you can forward ports from station to device itself, even starting Activity using am command from adb shell. You can also download and upload whole sqlite files (any most of others). Such configuration would work without any wireless connections, but devices would be somehow insecure. Development option is not meant as general tool for everyone and allows manipulation without being seen by user.
Other way might be USB modem tethering, but i am not really sure it can do something like that. If that provides address of local device that can be connected to, it would work. But I never have tried it.

Categories

Resources