Connecting SpringMVC app to MBaaS for Android Application - java

I'm trying to create native Android app with MBaaS e.g. on parse.com where clients could enter some data. The thing is that I would also like to create some admin side web app (e.g. in Java SpringMVC) which could read that user related info from MBaaS service. Is it possible to connect SpringMVC app to MBaaS service? If not, what are my options?

Parse.com has REST API to access your data, so you can write separate web application with admin interface and fetch data from Parse.com via REST API.
But remember that Parse.com won't host your Java application. You'll need to host it on your own.

Related

How to access SQL database with Web App and Android App

What is the best way to have a SQL database that can both be accessed by an android device via java code and by a web app via php code?
In my mind I imagined a MySQL database somewhere on the cloud that is accessed in all the normal ways by the web app using mysqli_connect and then somehow the same database calls are made in Java inside the android app.
But after some research it appears this may not be the way to do it. What is the way to do this correctly?
EDIT: It was suggested my question was too broad. What I want then is a database of some basic financial information which is stored on the cloud which is then able to be accessed via a web app written in the LAMP stack and via an android app (with java code).
It is a really simple problem but I am not sure what the best practice for such a problem is in android (I come from a web dev background)
The standard way to access a database for mobile application is different than a normal web page/application.
Mobile devices should never run queries in the database; What you do is create a web service that does all the queries in the database and then sends back HTTP responses in xml, JSON format to the mobile device for consumption.
At the same time you can create a web client that interacts with the web service the same way your mobile app does. This way if you get erroneous data you can debug the web service without having to recompile the code in the mobile app.
Do a Google search for restful web service

Android application Centralised Database Query

I am creating android application for my college notifications, I want to all the students to use same database through internet.What should I do.
Very simple approach would be:
Host the database in a public server. Then fetch data from & post data to database via web services. (basically you will be creating your own api)
use that api from your android app.

google app engine java backend _ah/start

I read in the google app engine backend documentation for java and it's said that we need to give the url for the backend to be _ah/start. Is the java backend url-pattern in web.xml needs to be _ah/start? Can I change that into my custom url name?
Thanks.
From the App Engine documentation:
A backend instance can be targeted with HTTP requests to
http://[instance]-dot-[backend_name]-dot-[your_app_id].appspot.com,
or at your application's custom domain.
So you can use whatever domain is configured for your app. _ah/start is a way to start the backend, i.e. a simple request sent to:
backend1-dot-myapp.appspot.com/_ah/start
will start the backend. You don't have to do it - you can send any request to a backend, and the App Engine will start it for you if no instances are running.

Android Quiz Application where users create the quiz content by a web form

I am developing an android quiz application for teachers where the teacher can login into a web interface and create questions, which can then be deployed to an android application.
My question is what database should i use? i am thinking that the data will have to be sorted on a mysql database when entered to the website.
Is it possible to connect to an external database on a android application? Is this the best method ?
In order to use an external storage for your android application, you will need to create you own web service.
If you create an XML web service, you can then make calls to your service and parse the response with an XmlPullParser.
Take a look at http://developer.android.com/training/basics/network-ops/xml.html for parsing XML.

Connecting Java Desktop to Cloud Interface

I have a Java desktop application which stores data into a SQLite db every 10 mins which is stored locally in the user's system. I have a cloud interface to visualize this data which uses PHP and MySQL.
I need to fetch data from the local db of the users. I think I will have to write a RESTful web service in Java so that the database which is locally stored is not exposed and the data is obtained by the web service.
I am a bit confused with this. Am I going in the right direction here?
You're on the right track. Your desktop application can connect to the cloud server and upload its information. You'll need to create an http request in your desktop application.
I think you should maybe approach this the other way round, rather than the web service getting data from your local system, your local system should upload its data to your cloud interface, perhaps using a RESTful web service on the server rather than the client.
Hope that helps.

Categories