So, is there some kind of setup to be made if you want to have a rest API working in the android emulator? To be mentioned is that my emulator has access to the internet and can access links on chrome and web test browser(I'm working in visual studio and trying to develop an asp.net web rest API)
So far I tried a bunch of stuff and none made a difference:
Try running projects both in Visual Studio and Android Studio
Cold boot the emulator from both ide
Add internet/network permissions in the androidManifest files
Try to run projects w the rest APIs that are supposed to be working as intended
Try to change DNS
Change the localhost address to 10.0.2.2
So far nothing works, the emulator neither in the browser nor in the app doesn’t see the local API
Did anyone have such a problem and found a fix?
Try changing your firewall settings, preferably turn it off.
Related
I'm using HttpClient in my Xamarin Forms project to call my Asp.net core REST Api with Base address: https://10.0.2.2:portNumber and everything works fine on the Emulator.
However when I test on my Android device it doesn't work and I don't even get any error. I tried changing the base address to my computer's IPv4 and disabling firewall like it was suggested in here How can I access my localhost from my Android device?.
Still nothing seems to work.
I would really appreciate a help here. Thanks
How do i deploy an NBAndroid app (by directly moving the .apk file or else compiling straight from NetBeans?) onto a connected tablet (HP Touch that i just put CyanogenMod ICS onto)? I connect it to my computer and it isnt recognised (like WebOS was) but Android ICS was installed fine. Do i need to use the bootloader to do this? I had a quick google and Stack search but could only see stuff relevant to using the emulator, and thought id probably get an answer here quicker.
Edit: this is the same question as this How to deploy android application to a device? which i discovered afterwards.
If the Tablet is not recogniced (have this problem at work, too, even with stock OS) maybe give it a try syncing it via a dropbox folder. Its the best bet for me, so far.
i found how to connect to a device via here
How can I connect to Android with ADB over TCP?
using this method you can get the .apk on the device without using dropbox
But the dropbox method is easier, even in development.
I am working on a android application, which is accessing a secured (https://) web service for some data. But I am facing some problem while testing the application in AVD emulator. The problem is that I am not been able to access the "https:" site neither from my application nor from the emulator browser. While I am trying to connect the site (in fact any secured website ) from the browser it's showing the error message as "Data connectivity problem.
A secure connection could not be established.". Though I can access the same websites from my window's web browsers.
According to my analysis the problem is with the privilege setting of the emulator. I am running the application on a corporate (my office) machine, where I don't have the admin rights (but I am a power user) and the machine is also behind the proxy. But as mentioned before I can access those secure sites from the machine's browsers, the only problem seems to be with the emulator accessibility.
I tried to test the same code from my personal laptop and as expected it's working perfectly.
Can somebody please help me out to find out the solution for this? How can I access a secured site from the emulator? FYI I am using eclipse Helios & Android 2.1
Please let me know if you need any more information from my side.
I m facing the problem of accessing Maps of Android Emulator. I am working on Android emulator 2.3.1 (Google API) API 9.
The problem is i am working behind corporate proxy. Emulator doesnt allowed to open Google Maps. It gives error :
this application requires active data connection
I have tried with the command line options but it didn't work, i don't have an android phone so the second options not there for me.
I had set the proxy settings in the emulator but that's not working with maps etc.
Only browser works. Any help will greatly be appreciated.
In the fact that i got the same problem as you, and then i searched and put the same question as u. But sadly, someone told me that, connect internet via proxy in android emulator does not support connecting to google map.This also happen with connect to web service via proxy.
This probably has been asked a hundred times. But I can't seem to see any answer. How do I set the Android emulator so that my app running in it can access a web server set up in our intranet (LAN)?
I have tried setting the proxy/port (both in the settings in Android and specifying -http-proxy when launching the emulator) but I can't get my app to connect to the intranet.
Hopefully, someone can give me a quick answer as this is really urgent.
Thanks and regards,
Rai
You do not need to add any new configuration to the emulator to work. It uses the network what your laptop or System has. It is a new bridge setup on your system using which it communicates to the outside world.
So, I suggest, you check if your system is able to connect to the web server is setup.