Connect android application to database on computer - java

I am trying to build a desktop application and an android application for a small business. A database will need to be accessed from both applications and the android app will not be using the same network as the desktop. Can someone point me in the right direction towards a solution? Also, there will be very little traffic to the database. Any suggestions? I would like for the desktop application to be able to host a remote database, whereas the android application will simply connect to the desktop computer through a web service.
Thanks!

You better host the database on a server. You can use a server side language like PHP or any language you prefer.
Android app will communicate with PHP/server side language. And server side language will process the data. Same goes for your desktop client.
You can follow this tutorial to setup Android:
How to connect Android with PHP, MySQL
It is not that much complex.

Related

connect and communicate between Windows application (c#) and andriod apllication (java)

I am trying to connect and communicate between Windows application and andriod apllication. I have used .Net Socket but it is only appllicable for windows. how can i code in andriod application using Java programming language and make communication between two seperate devices (windows and andriod).
I want windows application act as a client and andriod apllication as a server. The server receives the data from client, processes the data and returns the result to the client.
Thank you all in advance
There are several ways to connect and communicate between a Windows application (developed in C#) and an Android application (developed in Java). Here are a few options:
1/ Use a web service: One option is to create a web service that both the Windows and Android applications can access. The web service can be hosted on a server and both the Windows and Android applications can send HTTP requests to the web service to retrieve or send data. This is a good option if the applications need to communicate with each other over the internet.
2/ Use a local network connection: If both the Windows and Android applications are on the same local network, you can use a local network connection to communicate between the two. For example, you can use sockets to create a connection between the two applications and send data back and forth.
3/ Use a shared database: Another option is to use a database that both the Windows and Android applications can access. You can set up a database server and have both applications connect to it to retrieve and store data. This is a good option if you need to store large amounts of data and need the data to be persistent.
4/ Use a cloud service: There are also several cloud services that allow you to easily connect and communicate between Windows and Android applications. For example, Google's Firebase provides a real-time database that can be accessed by both Windows and Android applications, as well as other features such as push notifications and authentication.
It's worth noting that each of these options has its own set of pros and cons, and you'll need to choose the one that best fits your needs.

Saving data from android app to remote server

I am just a beginner in android app development and that's why I have many doubts. I am building one application where the user enters some data in editText. Now I want to save that data in my database. My database is running on my laptop. How would my app connect to the database? Do I need a web server in between? If yes then which web server is used for Android apps? Basically, i want to know the flow of data from app to the database.
Study more from Udacity.com, its free.
You may use a jdbc Connector to connect to database.
Connect your jdbc connector over local network ip\servername and database connection string
You can use REST Service when it comes to web Service on Android like this. You can either pass the values as parameters or an Object depending on your requirement. All the best
Wamp server is best option to play with server related utilities.You can use it even if you are offline. and it provides various option for data storage. It Mainly uses MySql and PHP scripts for fast performance.
For More details Click Here

Mobile to Mobile Remote Access using Android

i am developing an APP in Android which share screen to all android mobile phone connected in a session.
i want to know that android provides any sdk which provides same service like desktop to dektop access as in team View ?
or any Idea, which SDK i have to used?
Thank you.
Smartphones can't directly connect to each others since they are running in different networks. The common way to solve this is an additional server component. All phones need to connect to the server and send their data. The server is pushing this data to other connected clients, probably by using push notifications. In Android Push Notifications are known as C2DM.
Android developers blog:
http://android-developers.blogspot.com/2010/05/android-cloud-to-device-messaging.html
Here's another tutorial on the topic:
http://www.zylinc.com/blog-reader/items/c2dm-a-simple-introduction-using-a-java-server.html
I like 2X RDP a lot. It works very well on phone and tablet and connects to the regular Windows RDP server, so don’t have to install anything else on the server machine.

Questions about servers, databases, and android

Ok so I'm trying to develop a server for an android app that I'm developing.
Basically it's an application that needs to connect with other phones through a database system.
I was thinking of using an sql database to store the simple data I need to exchange.
What type of server should I be using?
What language should I be writing the database code in (if besides SQL)?
How do I get the android application to communicate and exchange information with the database?
Is there a type of virtual server I can use to test my app?
The server type and language choices very much depend on your skillset and environment. However, I'd suggest exposing queries to your database either through JSON or XML, and presenting through a web server.
PHP & MySQL are as good a choice as any, as you can run the same code on UNIX, Linux, Solaris, or MacOS servers. Of course, using a J2EE environment with JDBC drivers to a generic server is also a good choice, especially if you need to share any classes between Android and your server.
By 'virtual server' I assume you mean 'virtual handset', in which case the Android emulator in the SDK might be good enough (although it is painfully slow), or just use a real Android device plugged in to your development machine.
Hope this helps,
Phil Lello

Java based mobile app+IIS server

I want to develop a mobile application which can work in GPS/GPRS based phones. I heard like Java is the most suitable platform to develop that. But I want to connect this mobile application to the IIS server. Is it possible?
I have one more query.
Is it possible to deploy applications developed using .net mobile in basic gps phones?
Yes. It is possible.
In order to communicate with your IIS server ,
you can create webservice and deploy it over IIS and consume it from j2me app/
you can use URLConnection to make GET POST request to your IIS Server from J2ME Application.
First one is more preferable.
Introduction to J2ME Web Services

Categories