I want to make an http server on one android application and get its contents from another emulator.
Also other than http protocol, is there any other networking API + sample code that someone give me to connect and get content from one emulator to another?
Emulator is behind a virtual router. To make it accessible to the outside world (including other emulators) you need to configure Network Redirections (basically port forwarding)
Related
I have a local device (on my wifi network) that can be accessed using a web browser. However, it regularly changes its IP (it is not fixed, and, unfortunately, can't be).
How could I write a java code, for a small android app using a webview, that could scan my network and find the device's IP, quickly and easily ? Connecting to my router everytime this happens is a real pain...
I'm trying to find the X in the following URL : 192.168.1.X:4600/wui
At least, I think the port (4600) and /wui part should help narrowing the search.
Any ideas ? I am completely lost there, this is way above what I can do with android studio.
Thanks ! :-)
I have created database in one application and that application is installed in multiple devices.My requirement is that if i change the value in database of one device then,that changes in database should reflect in another device of same application.I need it without server/third api.
Thanks in advance...
This is precisely when one does need a sever.
Stop and consider what it is that you are asking for. You need a way for a phone to notify all other phones that hold the same application about a change. Phones are not directly addressable to each other via the web, which makes any kind of peer to peer algorithm tricky. SMS texts is the closest form of direct addressing that phones do support, thus it could be used to build a peer to peer protocol, but that would be tricky, unreliable and is unlikely to be beneficial.
A server on the other hand is the standard approach to solving this problem, the server acts as a shared agent that all phones that connect to the web can address easily. Even if the server is just an FTP server on a freebie hosting site.
You need to implement a server functionality in your android application.
What is a server : A server is a running instance of an application (software) capable of accepting requests from the client and giving responses accordingly. Servers can run on any computer including dedicated computers, which individually are also often referred to as "the server".
For further information,I would like to provide this link which will clarify you about communication between two devices Android - communicating between two devices (Use of bluetooth etc.)
I'm trying to create a TCP connection between my PC and Android smartphone to send text from the PC (Client) to the Android App (Server).
I found a tutorial which helped me with the code for the App which creates the server ( http://pastebin.com/z0xPSAvP ).
Now I'm struggling connecting my client with the server. The client is programmed with "AutoIt"
http://pastebin.com/tCW5bK9V
When I run the client the "could not connect to $socket" msg-box is displayed.
Could someone tell me what I'm doing wrong here?
Both devices are in the same Network (smartphone via WiFi and PC via LAN) and I checked for the smartphones IP in the smartphone settings.
First, try to access something like Google from your Android phone using its mobile browser. Maybe something still wrong with the network.
Then create a version of the server that could deliver simple HTTP response, visible from the Android mobile browser. Doing so with success eliminates firewalls and all client-related issues from the list of possible problems, making sure the server works and is accessible.
If it still does not work after you demonstrate connection between server and mobile browser, I would suggest to write the client in Java first using the this tutorial. You can try AutoIt and other more exotic approaches after you get anything working at all.
Im working on an Android project that makes the users add torrent downloads to their uTorrent client (or other) remotely from tehir Android device.
I've had a look to the webUI API of uTorrent but this requires the users to specify their hostname or IP address and make a port redirection in their router.
I've seen that uTorrent provides a remote access on https://remote.utorrent.com that dosent require any of these operations (but activating the option in uTorrent settings)... but I can't find any API access related to this.
Has anyone know about any way to remotely add torrents to uTorrent or any other desktop bittorrent client remotely? It doesen't matter if I have to get a working server between the Android device and the bittorrent client (in PHP, JS, Java...)
Thank you by advance.
I made an android application which connects to a local web service on my desktop computer, in a network with a router.
In AVD, I managed to make calls to the web service, but I have problems when I deploy the application on my android device (connection timeout). The phone was connected to the same network, but the call does not work.
Is there a simple way to make calls to the web service from the device? What are the ways to do this?
make sure that the url you are trying to reach is reachable. For example your computer may be behind a firewall which is not allowed to be accessed from outside the network. You can connect your phone to wireless access point on the same network as your computer.
or you can place the web service on a server that is web accessible.