Sharing database between android and windows phone - java

I have application developed by different apk/api, I have version java Desktop application and Android Application and Windows phone 8.1 Application , My problem that the three version use the same database to access it can modify and insert ..etc
how i create shared database between them to use the same database via internet because i enforce my user to access the internet to use the application. There is any way to do that ?

Sure! Host a WebService for sharing data amongst devices. Using a simple php script to insert and select will allow you to achieve this.
Something like this blog would help develop understanding of web services if you want a place to start.

You can create a an online database without having to implement your own backend using this website Parse and implement platform specific code to read/write data for different platforms using their SDKs.

Related

Actions On Google Deployment using webhook

I am using Java Client Library to use google Dialogflow. My questions is what happens when we use "appEnginedeploy" using gradle? Where is the code stored and more importantly how the implemented database and other files of code stored and accessed by our agent?
Thanks!
appEngineDeploy is setup to deploy the code to App Engine, a computing platform on Google Cloud. Code and associated project files are stored as they are in your project.
It's not entirely a VM, so you shouldn't necessarily think of App Engine as locating filepaths. If the project can make the links locally, then it should behave the same way in App Engine.
With regards to databases, it would depend if you're using an embedded database or using a hosted solution through another Google Cloud service. Presumably you'd use the database APIs for a Cloud service as shown in the documentation.

Using backend service providers with standalone applications

I am developing a restaurant POS & ordering system for my college project, I'm hoping to develop a standalone Java/C# (Still deciding) app which would serve as the POS and adding menu items + an android app for waiters to take orders from customers.
I'd like to connect these two apps and for the backend I'm looking into integrating Firebase or back4app since parse is being discontinued, is this a good choice?
I'd like some pointers on how to set up the database connection with a internet based backend service provider like Firebase or back4app with a standalone application.
Please feel free to suggest other possible routes I could take to connect these two apps together.
Thanks!
The Firebase realtime database component includes a JAVA Server SDK and a REST API which could be used for integrating with your standalone application.
There is some JAVA SDK documentation here:
https://firebase.google.com/docs/database/server/start

CouchDB with Android application

We have a web application developed iin GWT using couchDb as database, now we want to develop android application for the same web application. So we want to use same coucDB database for the android application also, in order to keep the one database for both applications (web & android).
So how to configure android application with couchDB.
Thank You
If your app does not need to work offline, you can just use your favorite HTTP client library, or a CouchDB-specific Java library to access your database over the network.
If you want to have your app maintain its own copy of your database (for offline and/or peer-to-peer usage), check out Couchbase Lite for Android — it can replicate with Apache CouchDB (which it sounds like you're using) or with Couchbase Sync Gateway (which has a few extra permissions management features).
You can also do similar from JS, if you're making a PhoneGap/Cordova app instead of native Java, by using the PouchDB library instead of the native Couchbase Lite library.

How to connect a desktop java application and an online mysql database and execute query?

I am trying to create an desktop application for shop. I can create create desktop app and database individually but I dont know how to connect them and how to execute query from desktop. May be for executing query I should use php but I dont know how. My database have been created in hosting site using cpanel.
You need some kind of APIs on the server side. First learn about RESTful APIs and build your server accordingly. Decide a PHP framework to do this with ease.
Next design your desktop application in JAVA which has
Ability to connect to your APIs ( Give Credentials use OAuth2 or something.)
Store data locally and Sync it whenever Internet Connectivity is available ( Resolve conflicts when syncing )
This will need lots of research and efforts. Happy Coding!
This is a broad question. If you are using php to build a desktop application (which appears to be), you must download WAMP server for executing php scripts locally. But I recommend you making a desktop application using java swing or any other popular GUI-based programming language. Please go through MySQL using Java's JDBC tutorial . Also Google as the question has a quite broad scope.
Your Question is Vague But here is a tutorial on creating a Java Connection to a database.
http://www.homeandlearn.co.uk/java/connect_to_a_database_using_java_code.html

java apps with mysql database

I have prepared an application that is a small demo of Student information manipulation. I have stored information related to students in a MySQL DB. Now my application is working 100% on my computer. But I want that work everywhere without depending on Database! I mean I just want "WHEREVER MY .JAR FILE GOES, DATABASE SHOULD ALSO GO ALONG WITH THAT INSIDE .JAR FILE "
So anyone who is using my application or trying it, they can realize exact result of this application.
How can I make this possible? Please someone help me.
For that I have done the following things:
I have installed MySQL database on my computer.
I have created a database on that MySQL server
I have created some tables in the database with a lots of data.. this data is to be used in my whole application, even for login.
Now I want to deliver this application to various clients but my clients are not technical persons and I don't want to give instructions to each of my client to do the above four steps.
How can I integrate some functionality into my app so that they can use my database, Tables and Data automatically .
It would be much better if the code can install the MySQL database automatically from the setup file attached with the application.
How the applications available in the market manage information
Have you thought of using another database engine?
MySQL requires the server to be installed and configured, and it is a huge task to be done by an automatic installer.
What about using for example SQLite http://www.sqlite.org/ or Apache Derby http://db.apache.org/derby/. Both of them work by creating a file in your working dir, you could setup the database and populate data at install time
I have two suggestions for you:
A. Use SQLite instead of MySQL. SQLite is an embeddable database engine and does exactly what you need. You can simply copy the .sqlite file where all the information is stored and distribute it with your JAR file. Given that you've already written you app to use MySQL, this could mean making a few changes to your code.
There is a good SQLite jdbc driver at:
https://bitbucket.org/xerial/sqlite-jdbc
I've used it before, though not extensively.
B. Use a portable installation of MySQL. If you are using Windows these are available on the MYSQL page, look for the downloads marked "ZIP Archive" instead of "MSI Installer". These versions are portable in that they do not require an installation process, just unzip the file, and start the service. Your clients need to know how to start it up, of course. Perhaps you could create a shortcut for that.
Of course, the idea of MySQL being a network server is so that everyone in the enterprise works with the same data, by connecting to the same server. If your clients will use this application in various computers in the same company, you should consider having a single MySQL Server installed, and making the clients connect to that.
Hope this helps!

Categories