Android :: Emulator Access Server In Local Network
Aug 26, 2010
i am having difficulties to have my android app running in the emulator to connect to servers in my local network.i am getting a java.net.UnknownHostException but the servers are resolvable fine from the machine where the emulator is run.
Current configuration Use Android emulator and GAE tools (to access local GAE service I set uri http://10.0.2.2:8888/XXX and it works.I would like to use Android device(phone) via USB to call web service running on connected "local" computer.What is best configuration practice ((I don't have static IP) I am using mac and linux)?
I'm developping an android application. This application use a web service to get some informations. The web service is deployed on local in my computer. When i run my app with the android emulator, everything is ok.The emulator use the address 10.0.2.2 to use the local web service.Now i would like to know if it's possible to connect my mobile phone to my computer and to have access to my local web service.In others words, use my own mobile phone instead of the emulator.
I've noticed very poor performance in the emulator (1.6 and 2.1) when trying to complete the forth statement below. It will take 5+ minutes running in the emulator. Interestingly, when I debug on my phone it's not nearly as bad at maybe a minute or so, but still not great. Running the app on my phone without debugging yields great performance (seconds). URL url = new URL(CommonProperties.BASE_SERVICE_URL + "param=1"); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document dom = builder.parse(url.openConnection(). getInputStream()); is there something I can do to speed up network access while using the emulator? Has anyone noticed anything similar?
Is it possible to create a sort of wifi lan network (i.e., make the captivate work as a local area network router without internet access)? this could potentially be useful: quick filesharing, improvised LAN for games, etc...
I am able to connect my PC to the local tigase server setup locally(I am using Smack API). Now I am facing problems when I want to connect Android Phone to that server over Wi-Fi. I am able to connect to the local server by using client Beem for android.My XMPP Domain name of the server is my PC name "mwbn43-1" and IP address is "192.168.0.221"(I am able to ping this server from Android Terminal Emulator). In Beem Settings there is an Advanced option where I can specify server I want to connect with(which I have given as IP address).If I don't set this option I am not able to conect.Now here is the snippet of the code I have used for my android client.
Can one use an Android phone to access basically local (think intranet for example) web servers to view pages? I ask this question because some cell phones with some phone network appear to use a special server to funnel cell phone requests thru and that the server offloads from the browser part of what a browser normally does. I get the impression that the Opera mobile browser works this way.I want to talk to local devices that serve web pages and connect directly to them from phones. Does the Chrome browser in Android have the full functionality that Chrome has on a PC? Can it parse HTML, do XMLHttpRequest, and otherwise act like a modern browser?
What is the problem in the given code to retrieve the data from the local server by using Http Get method......Give some example code......I tried but if i give the url the result i m getting same url in the text view...shall any one point out wat the error in the code
I am wanting to try out RTSP locally so that I can play about with it etc. I've got RTSP working from m.youtube.com and would now like to try and get it so it streams from my LAN. Obviously the Emulator is no good, because like I've read it either requires a lot of computing power OR it has an internal firewall that prevents playback. Which ever the reason, the Emulator is not working. So I attached my HTC Hero to my LAN via WiFi (connected it to my WiFi router). I also have another computer (lets call it Computer A) attached to my WiFi via Ethernet cable, and then another computer (lets call that Computer B) attached to that one, again via Ethernet.
Now I've run Wowza server on Computer A and tried to browse via my HTC but it seems it is trying to connect out to the internet every single time. I've also run an Apache web server on Computer A, but Hero still can not see this, so I know it's not a configuration fault on the servers. How can I test RTSP when I can't even get my Hero to connect to my local network ? I've searched around to see what the problem but can't find it, so either no one knows, or more likely I am not putting in the right search parameters. Can someone perhaps guide me on this on how to attach phone into Local network? Once I have it connected I can play about with RTSP to my heart's content then.
I have some web pages that I want to bundle with my Android application and display as static pages. Where do I put them? How do I access them? I'm working in Eclipse, so I want a solution that automatically bundles them.I've tried putting my web pages in res/raw, and I can read them as an input stream from there, so I could push that into a WebView. But I'd really prefer if I could stick them somewhere and access them with a URL. I've tried file:///android_asset/about.html but that didn't work. Surely there's a way to form a URL to display bundled pages.
I've been trying to create a local connection to a computer with a Socket from the emulator thinking that it would automagically uses a emulated wifi connection. It doesn't work, in particular because wifi is not supported on the emulator:
- Does a Socket connection automatically choose the fastest connection (the wifi one if it exists).
- Why wifi not supported by the emulator? Will it be?
For those in countries still not blessed by the grace of having the possibility to buy a Gphone, that can be useful...
At work, we are networked together (not wireless), anyone can type, for example \cpu1253c$ and you are now mapped to that person's computer, you can view anything on there and they don't even know you are in their computer. So I am wondering how to hide or protect my phone when it's plugged in, just charging or as a disc drive. I could use a wall charger but when I want to do file transfers, I am not sure if anyone can access my phone (Samsung S4). I am not sure what kind of network our company is on, when I log in from home, it comes to a SSL-VPN screen, another says Sonic Wall. Today I tried the properties option in the folder I had open with my phone and there was no "no share" option that I could see
I'm now trying to implement my own content provider. My original data was stored on network or local/remote file systems, so I want to provide data via input stream. I know that client may call ContentResolver.getnputStream to retrieve the input stream to access data. But I don't know how to implement content provider in this situation, I searched the Internet but all the tutorials for content provider are talks about how to expose data that stored on local database. how to expose data that stored on file systems using a content provider? what happened when client call ContentResolver.getnputStream? I want to know how to return an input stream to my client.
Finally broke down and rooted tonight.Picked up Wireless Tether from the market, had everything set kept getting limited access messages on my laptop.Did some searching and came across the solution to manually download the apk and a .bin file and put it in the android.tether directory on sd card.Was finally able to connect from my laptop.However, my connection is limited to "local only".I have tried using the access control, disabling access control, turning on encryption, disabling encryption, etc.Every time I connect, local only.I've flushed my IP info on the laptop and still local only.What do I need to do to get full access?
Such like massager app, client/server framework, using tcp long connection using heart beating packet. Cause TCP connection, so when local network is disable or changed, connection would be disconnected. But to the client, it may not be known right now till the next interaction with the SERVER. Is there a general solution to reconnect automatically when network is available again? For example, a broadcast receiver would be triggered when network connection changed, and reconnect when available? Further more, how to check the network capacity, auto-connect the wanted one cause good bandwidth?
So I have an android application that needs to connect to a socket server. That's simple enough if the socket server was running on my development machine. However the socket server is running on a server not only not on my own machine, but on a different subnet. How would I connect my emulator to the socket server? I understand how the port forwarding works to connect to the local machine, but I'm sort of confused on how I can redirect it across a subnet from my dev machine.
I want an android application so that it can connect to emulator and transfer that from it. please let me know how to proceed in that. i have done through the socket but i am getting exception in that.please if u find any code or website let me know.
I am developing an application in android to connect emulator to server and then read, edit and write on it. Has any one worked on such application please let me know. Else guide how to develop this application.
I am using Socket in my application. i am able to run the code when my machine is server and client but not able to do when connect to other machines.
I would like to implement a functionality in my game to give some daily goodies. But user can easily abuse it by changing the date of the device again and again. I know this can be easily implemented through some server. Is there any way to handle it locally without the involvement of server or network connectivity?
I am trying to stream mp3 stream from my local http server indeed hosted on my phone to android media player.When local server gets the new socket , it starts writing some http headers followed by mp3 stream. but mediaplayer socket is throwing "Broken pipe" exception.Wat may be the issue causing this.
I've read many postings about problems getting the Android emulator DNS to work properly in certain situations. I have a simple app that makes an HTTP connection to a server on the Internet. If I use an IP address using the latest version of the emulator it works fine. If I use the domain name it throws a java.net.UnknownHostException: Host is unresolved: exception. The identical code works fine on any actual device. Has anyone figured out how to fix this situation? I've spent days trying everything, from using proxy servers to setting up and running a DNS server on my development machine. This situation/experience is a shame, because the emulator seems like such an impressive and well thought out collection of tools for developing and testing apps. However, it is currently useless to me. Is there anyone who can help? A prior thread on the same issue-appears to be the same situation: http://groups.google.com/group/android-developers/browse_thread/threa...