Our apk will connect to a server automatically when the user switches wifi network. It will invoke gethostbyname to find the server's ip first and then connect to the ip. All these code is written in C++.Everything works priori to Android 4.0. But in Android 4.0, gethostbyname returns the original ip for the server after switching the wifi network. So the apk's connection timeouts. The only possible solution is to restart the apk. But the java code InetAddress.getAllByName works ok. So what's wrong with Android 4.0's gethostbyname in C?
Any idea about gethostbyname on Android 4.0?
796 Views Asked by crybird At
0
There are 0 best solutions below
Related Questions in ANDROID
- Delay in loading Html Page(WebView) from assets folder in real android device
- MPAndroidChart method setWordWrapEnabled() not found
- Designing a 'new post' android activity
- Android :EditText inside ListView always update first item in the listview
- Android: Transferring Data via ContentIntent
- Wrong xml being inflated android
- AsyncTask Class
- Unable to receive extras in Android Intent
- Website zoomed out on Android default browser
- Square FloatingActionButton with Android Design Library
- Google Maps API Re-size
- Push toolbar content below statusbar
- Android FragmentPagerAdapter Circular listview
- Layout not shifting up when keyboard is open
- auDIO_OUTPUT_FLAG_FAST denied by client can't connect to localhost
Related Questions in C++
- C++ using std::vector across boundaries
- Linked list without struct
- Connecting Signal QML to C++ (Qt5)
- how to get the reference of struct soap inherited in C++ Proxy/Service class
- Why we can't assign value to pointer
- Conversion of objects in c++
- shared_ptr: "is not a type" error
- C++ template using pointer and non pointer arguments in a QVector
- C++ SFML 2.2 vectors
- Lifetime of temporary objects
- I want to be able to use 4 different variables in a select statement in c ++
- segmentation fault: 11, extracting data in vector
- How to catch delay-import dll errors (missing dll or symbol) in MinGW(-w64)?
- How can I print all the values in this linked list inside a hash table?
- Configured TTL for A record(s) backing CNAME records
Related Questions in DNS
- Configured TTL for A record(s) backing CNAME records
- Redirecting subdomain to directory on Azure
- SPF and DKIM records for Mandrill on DigitalOcean
- How to convert hostname to DNS name?
- Could someone bring Google OAuth2 for Cloud DNS via Rest to light?
- Spoof Captive Portal Screen on an iOS Device using DNS
- DNS_PROBE_FINISHED_NXDOMAIN on Google App Engine website
- How to check if a redirect leads to a different domain
- IP address to Domain Name? DNS?
- error CS1729: The type `ARSoft.Tools.Net.Dns.DnsServer' does not contain a constructor that takes `4' arguments
- Windows, Apache, Acrylic DNS, and wildcard subdomains
- How to configure DNS for microsoft odbc driver for oracle (in 64 bit arch.)
- How to use one time domain name in android?
- logstash dns filter miss
- Redirect website to another website if blocked in particular region
Related Questions in WIFI
- Android check WIFI status (disconnected or user changed WIFI)
- Can i send data through wifi while on another connection
- Find all/particular SSID
- Async HTTP Request and Arduino
- Using scapy with wifi
- Detecting wirless network status change in .NET
- Wifi ESP8266 between to micros
- Data Transfer between iOS and PC over WiFi
- How can i programatically switch my wifi to wifi Printer for printing in iOS
- What is the easiest way to check the network speed in android on both mobile and wifi connection?
- Accept any Wi-Fi password on OpenWRT (hostap)
- OS X Server kills WiFi connection
- Connect multiple devices in GoPro network
- Transfer Data over wifi in android between server and clients
- SCAPY PYTHON - Get 802.11 DS Status
Related Questions in GETHOSTBYNAME
- Why is the program broken down when it runs at if((hptr = gethostbyname(buffer)) == NULL)
- IP address order in gethostbyname function
- gethostbyname xcode issues
- A Better Way to Verify Email Domain?
- gethostbyname_ex(hostname) extremely slow
- gethostbyname_r() calls for non-resolvable hosts always returning with h_errnop set to TRY_AGAIN (on Ubuntu 19.04 and 20.04)
- socket.gethostbyname doesn't behave well
- Powershell script error processing CSV data
- Confusing behavior when attempting to use the HOSTALIASES environment variable
- PHP: gethostbyname bug
- Any idea about gethostbyname on Android 4.0?
- PHP: inconsistent results for gethostbyname() and checkdnsrr()
- process-local override of name resolution?
- Embedded Segger embOS: getaddrinfo translation in gethostbyname
- Why does getHostByName() return a different result than ping?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?