i have developed an android application in android sdk 2.2 . This app is having tomcat server connectivity as well as mysql database connectivity. this app is running fine on emulator.
but for deploying this app on android device do i need to configure any settting??
Not particularly, if you have it working in an emulator. But why ask this on StackOverflow? Just go out and try it on a device. Also be aware that client network connectivity is frequently slow, error-prone and sometimes nonexistent, so make sure you're handling network issues gracefully.
EDIT: The comment below would indicate this is actually a duplicate of Access dev machine localhost via usb, although the original wording is pretty unclear.
Related
Hello there long time reader of Stack Overflow but first time poster,
I am a bit new to android development but we decided to build a Xamarin.Forms app which consumes our ASP.NET REST service. When running the app on an emulator on my computer, connected via ethernet, I am able to connect to the service. However, when running on a tablet or phone that is connected on our work wifi, the connection just hangs and times out.
Interesting enough, when the device is switched to mobile data it can connect to the endpoints again, and iPhones can connect to the endpoints on mobile data or wifi.
I'm curious what I'm missing here. Please let me know what you think or additional information I should include.
While this thread has been opened for some time, we have found our problem resolved: it was a mixture of our network support changing some settings on our routers (though I can unfortunately not remember what settings) and also our tablets do a system update.
I am not sure which of these factors was the cause of our success now but the issue is done. I just wanted to post this in case anyone else ran into something similar.
I can proxy almost every application but there are some that won't even make a connection when either the system proxy is set via Wlan -> Modify network config or using the Global Proxy setting from ProxyDroid.
I guess these applications are somehow monitoring that a proxy is used even with ProxyDriod on a rooted phone. The applications work as normal when the proxy is turned off. When turned on the applications are not making a single request, they just return an error code. The error code is identical as if Wifi and Celluar data is turned off.
Sample of applications affected:
BankId
Handelsbanken Privat
Facebook - does not throw an error but no requests are shown. If functions like search are used an error is thrown
Mobile used for proxying:
Samsung Galaxy Note 4 SM-N910F
Android 6.0.1
Rooted using CF-Auto-Root
Burp is used as a proxy listener and has been set up using these guides and normal HTTPS sites works without a warning.
https://support.portswigger.net/customer/portal/articles/1841101-configuring-an-android-device-to-work-with-burp
https://support.portswigger.net/customer/portal/articles/1841102-Mobile%20Set-up_Android%20Device%20-%20Installing%20CA%20Certificate.html
What is the most probable way that these applications check if a proxy is used? Has anyone else experienced this and managed to bypass proxy evasion from an Android App?
It seems the applications does not check for a proxy but rather they check the certificate using SSL pinning, which is really great except for my purpose.
More about certificate pinning.
Here is what I did to get it working:
Install CWM custom recovery. I used this guide for this:
http://www.droidopinions.com/install-cwm-custom-recovery-galaxy-note-4-models/
I then followed this guide to install the Xposed framework:
https://devs-lab.com/download-install-xposed-for-samsung-devices.html
Then I installed JustTrustMe from Github:
https://github.com/Fuzion24/JustTrustMe
After enabeling the module and restarting the phone I could proxy every application without trouble.
Here is a great guide for proxying Android applications:
https://secvibe.com/android-appsec-27855dca8531#.ta66ox3di
Note:
I also tried installing Cydia Substrate from Android Play Store and then install the apk for Android TrustKiller. However this did not work for me. From Cydia Substrate I got the error
"Something about your device made it impossible for substrate to
perform its internal safety check; can you please contact saurik via
e-mail?"
Also Android TrustKiller has not been updated for three years.
I'm currently building an Android Application and an accompanying Web Service. Right now I'm having some trouble figuring out the best way to configure the Android Application to know where the Web Service is. When I use the emulator and I'm running a local dev version of the web service, I manually tell the Android Application that the web service is hosted at "10.0.2.2". This works well for the emulator, but not for a physical device. I'm able to access it, via my phone, over the LAN using it's IP address, so actually accessing the web service is not the problem. It's just a pain to have to change the IP when I want to run it on my phone. Is there some configuration I could use to make this task easier?
I found out that you could do something similar to what I was asking using some gradle.
http://jeremie-martinez.com/2015/05/05/inject-host-gradle/
This post shows you how to add the ip address of the development computer to the code at compilation time.
I have followed the tutorial of bluemix that is called bluelist. See here: http://www.ibm.com/developerworks/library/mo-android-mobiledata-app/#N1021F
I have installed all required libs and i have installed everything in the bluemix side.
I get error IBMBLUEMIX-0554E: timeout expired before connection could be established.
any solutions?
This could be caused by a couple issues.
You could be attempting to access an internal test zone (AKA stage1) without being in the internal network. Make sure there is not stage1 present in your app route.
Your phone/emulator may not be connected to a network properly. Please be sure that your test device is connected to the internet via data service or local connection. You can try running a speed test on that device if in doubt. Some custom created emulators can also have issues of their own. Try using a physical device if possible.
You may be on a network using a proxy server. I have heard of timeout issues when using a proxy. You may need to use a network that does not utilize a proxy.
This issue comes intermittently some times due to network/connectivity issue.Also you need to Verify that your applicationId, applicationSecret, and applicationRoute are correct.You can go to the Overview of your Mobile Cloud Service application on ACE to find your applicationId and Route. The applicationSecret is on the MAS portion of the ACE UI for your application.
Similar issue was reported already:
https://developer.ibm.com/answers/questions/26821/getting-time-out-error-while-conencting-to-mobile-cloud-bluemix-application.html
I'm new to Android and CouchDB and have a few questions.
Is it actually possible to replicate the contents of a Windows CouchDB database to Android without developing some sort of app?
CouchApp is installed on my Motorola Defy and it says CouchDB is running on http://ip:port/.
With the build in browser I cannot verify that information, because the URL cannot be opend (neither from the phone nor from my pc), but http://localhost:port/ works fine.
I tried setting bind_address in /sdcard/Android/data/com.aranomurl.couchapp/couchdb/etc/couchdb/local.ini to 0.0.0.0 and to the actual IP, but neither one changes anything.
Using the futon replicator I get the error message "Replication failed: could not open http://ip:port/".
As a correlating question, I wonder how continous replication is supposed to work for mobile devices, since IP address and port seem to change very frequently.
(edited once to clarify that mobile futon's URL is not working)
0.0.0.0 will listen on all interfaces so it will be accessible as long as your device is, Generally on devices its a good idea to pull from the phone as opposed to push to it, then you dont need to worry about the port switching.
right now your android and windows machine cant talk to each other, this could be a variety of problems related to your local network, when you can access the url that is displayed in mobilefuton, then your replication should be fine (replicating against a public host is also an easy way to get started)
Problem solved with newer CouchDB App for Android https://market.android.com/details?id=com.daleharvey.mobilefuton
Built in [continious] replication is working fine...
As mentioned earlier, the problem is solved in the newer version of the app.
But just incase replication doesn't work,
Make sure you have the couchdb port open and accessible universally/within the network in which you want to access.
Try initiating replication from Android to Remote server always, because, as you said, Android's IP might be hard to track down and keep static!