I am currently using Apache Cordova with Visual Studio 2015 for my mobile app development. I am also using Genymotion emulator and a Sqlite Database.
I noticed, if I am to use two different devices(Merchant POV & Consumer POV) to demonstrate my app, the database I will be using will be not be a synced database due to it being two different devices.
Is there any way I can make sure that both devices are using a synced database?
You would need a custom sync API to synchronize data like that. But if you are only in the early stage of testing your local database, you can make a script that loads some sample data wich will be executed on opening of your app. That way any device will run the same script and then have the same sample data.
But if you want to insert data on a device and then have that same data on another, you will have to sync it with your API.
hope it helps
Related
I am using MySql database in my android app, can you tell me how can i run it on my android phone ratter than running it on emulator.
If you want to persist data in your app, Android by default has SQLite library pre-installed. Here you can see the tutorial how to use it. https://developer.android.com/training/data-storage/sqlite
But as they recommend on their landing page, it is much easier and convenient to use Room library, which works as ORM tool for SQLite on your device.
Here is the link to room library.
I am doing a project which requires me to query google cloud mysql database to save, delete, retrieve and update data using app build in android studio.
I have been googling for quite some time, all the tutorials are using AppEngine. However in android studio 3.0+, there isn't any App Engine available anymore.
Please give advice / guidance on what should I do?
thanks in advance
Since Android Studio 3 doesn't support AppEngine anymore, you have two options:
Build your own custom backend (web service) to function as a layer that allows database consumption via the Android app. This will require more development effort than option 2.
Set up Firebase and use its database instead.
You will have to do a bit of research on getting Firebase up and running, but you wan't have to build a custom backend.
If using the Google Cloud MySQL database is a must, then you can't get around to foreseeing your own backend layer.
I'm a complete beginner with mobile development. A friend of mine approached me with a project idea, asking me if it was possible to do it. The way I see it, it is a mobile app that needs to read and write data on a database in order to write inspection reports on the job of various staff members.
I told that friend that I would check how mobile development works first and would try to create a prototype to present. I've asked and Android is the main platform that is desired, so I've tried working with Android Studio and it is pretty straight forward up to now.
So, now I'm wondering what is the proper way to sync mobile apps with the database. Last time I worked with a database in a project we had multiple clients connecting to a server to play some small game together and the server would access the database and send the data back to the client through the network connection. So, I was wondering if a mobile app was supposed to use this communication structure or would simply talk directly to the database instead of a server.
The structure I have in mind:
Is this an acceptable structure? Or am I thinking of this the wrong way?
I would like build a mobile application in order to learn the technology.
I have chosen Ionic framework for the same, as it takes care of majority of settings for building the application. But, when coming to database for the app which I am trying to build, I am bit confused.
Some links as a result of googling suggest me to use SQLite and some pull me towards Firebase. My doubt is, are they related for comparison? I guess, SQLite and Firebase cannot be compared with. Please clarify.
Thanks
Manikandan J
SQLite is your phone's database and Firebase is an online database.
Using SQLite, you can create apps which do not support sharing with others. An example, pac man. Say you got a highscore of "20". But you cannot share this highscore with other people's phones because it is local (inside your phone).
Using Firebase, you can store data online, for example, registration details etc. Once people have registered they can login with their info using multiple platforms (depending on your target). You can make them share things with eachother and so on.
SQLite is more suitable fro developing offline android application. Firebase always required a server but SQLite did'nt require any server so for Firebase you should have internet required but in SQLite you can achieve your goal offline. So depending upon the conditions you can use one of this.
Local DB always sync to remote server sounds a great idea, because you get the responsiveness for using local DB, but also get sync crossing devices.
But can anybody talk about their experiences with couchbase on Android?
https://github.com/couchbase/Android-Couchbase/
What are other options out there? Cloudant?
Look at Touch-DB Android. It's more compact than Android-Couchbase and is still regularly updated and maintained (I believe the main contributor is working on a big release, which is why the last update we two months ago). The framework is built on top of Ektorp and emulates a CouchDB database on your Android device.
Replication to and from a remote database is fairly intuitive and easy to set-up.
I use CloudAnt as my remote back end for my Android game.
I can tell you that in general, it works. e.g. I have an android app that syncs with iriscouch.com. But you might want to ask a more specific question.
iBoxDB is another option. It is a lightweight database for java. You can customize replication.
https://github.com/iboxdb/forjava