android accesses database server without wireless - android

So I need to develop an android application with a SQL_Lite db. Several times a week there must be a synchronisation between androids DB and a MySql BD located on WAMP server.
The condition is that this sync must be done when the android device is docked to a "docking station".
How can I transfer data from my android application to mysql DB without using the wireless option?
Thank you for your suggestions

You can use ADB tool from android SDK. It would however require enabled application development on all phones and installed development drives on docking station. Then you can forward ports from station to device itself, even starting Activity using am command from adb shell. You can also download and upload whole sqlite files (any most of others). Such configuration would work without any wireless connections, but devices would be somehow insecure. Development option is not meant as general tool for everyone and allows manipulation without being seen by user.
Other way might be USB modem tethering, but i am not really sure it can do something like that. If that provides address of local device that can be connected to, it would work. But I never have tried it.

Related

How do I access an external IP on Android?

I would like to access my webserver running a Polymer starter kit app from an Android devices, but I don't seem to get it to work..
Polymer starter kit comes with browser-sync, which is very nice, but
I cán access my webapp on another laptop, but when I try to access it from an Android device it just keeps loading and eventually there will be a connection timeout. I triend another android device, but still the same.
Any Idea's how to access the app(external ip) from android?
Is this only for development/debugging purposes or do you want to deploy in such a scenario?
For debugging you can use Chrome's remote-debugging capabilities https://developer.chrome.com/devtools/docs/remote-debugging.
I haven't tried but I think the ADB tool allows to redirect TCP connections as well.
Otherwise you need to teach Android the IP routes (and optionally a DNS) so the device can route connection attempts to your server.

Debug android app that connects to local PC service over USB on OSX

I'm going to fly out of state tomorrow, and it'd be ideal if I was able to continue working on my Android app while I'm in the air.
The problem is, my app requires a backend service that I can run on my laptop (OSX). At home this is simple, because I'm on my local WiFi network and I can simply connect to a box with the service hosted on it, but I'm not sure what would be the best way to debug the app over USB only.
I'd really much prefer to not share a local WiFi network through my laptop due to battery usage - it'd be best if I could leverage the USB connection I already have to debug and create a local network between my phone and my laptop.
I've seen a few other posts that mention I should be able to select the USB Tether option, but when I tried it, it first attempts to contact my provider (Verizon) to see if the feature is available. When I put the phone into airplane mode, it's unable to communicate with my carrier, so it doesn't look like this will be possible in the air. Regardless, it doesn't seem to work out of the box on OSX.
In reality, my local service situation is a bit more complex than average (it actually runs in a VM). The ideal situation would be to create a local network between my computer and my device, so it can access all VMs (Vagrant/VirtualBox) within the network.
If I'm reading this question correctly, it looks like there may be other solutions for Windows, but I'd really rather run it in OSX if that's possible.
How can I create a local network between my laptop and Android device over USB?

How can i develop an android application that can access blocked website -Android

I want to develop an android application that can access blocked website. I thought about changing DNS address but Android give permission only for wifi dns address changing. I have also searched about using proxy sites but i couldn't make it . I'm searching for more compatible solution .
I'm waiting your suggestions. Thanks in advance.
There are many types of block which can be applied to a user on a mobile network.
The one you are referring to is done via DNS and I suspect you want to do such a thing because Android does not provide an interface to change DNS when you are using a mobile connection.
In that case is necessary to use root privileges. Your app will be running only on a rooted device. So you need to learn how to run a command using su. A good way to learn is to take a look to an open source root app such as Ad-Away.
To change DNS for a mobile network is necessary to know the Android version: in KitKat the DNS resolution is done through the netd daemon which ignores changes made via setprop. In Android <4.4 many DNS changer apps used commands like these
setprop dhcp.eth0.dns1 8.8.8.8
setprop dhcp.eth0.dns2 8.8.4.4
For Android 4.4 I wrote an app called Override DNS which uses a different set of commands.
Internet censorship can be done on other different levels.
I think the best way to circumvent any kind of block is to host a VPN server on a VPS located in USA or Europe and to activate a VPN from Android device. With this method any kind of network communication can be sent through the VPN so there's no problem related to DNS etc. In this scenario there's no need to have root privileges (depending on the VPN technology choosen).

Connect Android device to host to update data

I'm writing an Android application for Hotel Management. That each employee has own tablet running Android OS. this app sometimes will send data to host (that the room has been booked) or host will send data to client (about new condition of other rooms).
Host can be an another Android smartphone or a PC, and those device will connect together through same wifi network.
I don't know which way is easier (using smartphone for host or PC for host). If using PC, I decide that PC will have local server running database, and each tablet will connect to this server and update data from database. Does this easy to implement ?
Please help me figure out those problems. thanks :)
You want to use PC/Server for the host so you can run a proper RDBMS.
There are tons of examples available for creating Android apps that talk to a variety of RDBMS systems. On your server you'll run an interpreter (PHP, ASP.NET, Node) and your Android app will connect to this over the Wifi network using http.
See example here:
http://www.androidhive.info/2012/01/android-login-and-registration-with-php-mysql-and-sqlite/

Android - Is there is a way to remotely open and debug a given Android device?

My scenario is as follow:
I'm working with an app development which a bug occurs in the app when it is in a different country than mine, and only there. The bug is related with a fail in an image download through an URL access. Right now, I haven't figured out yet what it can be. Some subjects I've already looked up are:
Its not related to internationalization and/or culture, because the code does not implement this;
Its not related to firewall/security access, because if the user in the other country opens the image's URL, he can look at the image;
Without rooting the device, is there is a way to remotely open and debug a given Android device, just like a SSH or a VNC?
Similar questions are:
Debugging android app on a device remotely
Remote Debugging
Well,
you can debug a device using a TCP/IP connection (I sometimes debug using WIFI at home). all you need to do is make sure the remote device is connected to the internet and is accessible to your PC with a direct TCP/IP connection.
As the Android device is connected in another location - you'll have to make sure your router's firewall allows outgoing connection for communications in the port ADB is using , and that the target Android device receives communications in that port (if it's behind a router - the router should allow connections under the righ port and forward all comm in that port to the android device).
in other words - you have to "tunnel" your communication to the target device. there are other tunneling solutions/products but I've never used them and I prefer the "manual" way
Good luck,
Dan
EDIT : in Android 11 - adb can work on WIFI natively : https://developer.android.com/studio/run/device#wireless
Perhaps you can have the user install something like aLogcat and have them send you a log with the failure.
Well as remotely debugging a device I don't know but you can use ACRA (Application Crash Report for Android) .
All you need is to set up a google doc, add the lib to your project and when the app crashes it will send a crash report to that google doc. See quick setup here

Categories

Resources