i have a android app, how can i save data from the android app to a RoR database?
thanks.
As far as I understand you have got server app on Rails and local Android app.
Best idea is to use all benefits of REST. Using REST you'll have some kind of API for your Rails app. So your connection will be through HTTP protocol via POST and GET requests
Related
I am seeking information about using Firebase (as database) for Java. Is this possible along with hosting of Java (using Spring framework) project over Firebase hosting.
It is possible. Use Google App Engine an environment for running application code in the cloud; Platform as a service (PaaS).
Below is description how make to make basic example.
In the this tutorial, you'll learn how to:
Create a backend service running on App Engine using Android Studio.
Connect the backend service to your data in Firebase.
The sample app stores a to-do list in Firebase, which automatically synchronizes the data across devices, and then uses backend logic running on App Engine to send out daily reminder emails:
https://cloud.google.com/solutions/mobile/firebase-app-engine-android-studio
By connecting App Engine to a Firebase database, you can perform complex logic on data without having to manage synchronization and updates; Firebase handles that for you.
No. Firebase offers hosting for static assets only.
The Google Cloud Run seems is most suitable for what you want.
Consider to check the documentation and pricing. Like firebase, cloud run also has a free tier that can help you develop your app with no costs.
The cloud run supports several programming languages including Java.
Once created the service you can try to connect to your firebase project...
Cloud Run Java Documentation
I recently started developing my first web application with Spring and I'm stuck with a question I could not really find an answer to. What I have is a simple Spring MVC application running in tomcat which provides data in form of JSON, XML or binary via REST. This service is consumed by two clients I developed, a simple Java desktop application and an Android app. So far the clients only got information about new data by polling.
What I want now, is a way for the server to send notifications/messages to the clients when new data is available. For the Android client it would be good if the notifications could received anytime, not only when the app is currently open of course. I found lots of information for JavaScript client code but very little really useful, up-to date input about what the options for java and android clients are.
It would be really great if someone could give me some idea what would be the best way to achieve what I want (ideally something which integrates well with Spring on the server side), what protocols/libraries/frameworks to use, maybe even point me to some example or tutorial, how to implement this on server and client side.
Thanks in advance for any input.
For android or mobile devices, Google Cloud Messaging is the preferred way of sending messages to applications running on devices.
Example : spring gcm server side project and a sample tutorial.
For desktop apps, either poll regularly the server or run something in background like crontab or active-mq to check the messages and start the desktop app.
WebSockets are the best solution. check the implementation in java in the server side
I'am new to Android app development. I want to create a mobile application that has two entry fields.
i.e:
FirstName and
LastName
and will input into MySQL database.
Is there a basic source code example available to achieve something like this? how would i create something like this?
Thanks for your help guys.
Android access to remote SQL database will explain to you why you dont want to connect a android device directly to a SQL server of any kind. It is a bad idea.
Go do some research on how to create either a SOAP or REST service and how to consume them in Android. Here is a article on REST and here is a article on SOAP.
Once you can create web services either SOAP or REST then any device can use your service not just android.
There is some great way to generate web services for this example by using Netbeans and Eclipse. Here is a great Netbeans tutorial to get you started.
Ok so I am still new to Objective C and currently learning it. I wanted to make an app where people can login and submit data to a database. I have research and found that I need to connect to a web server (I will use a Java web server) and from this server, it will communicate to the database server.
However, I am just wondering exactly how I would connect from an IPad app (that I will make in the future) to a Java App Server such as Glashfish. To do this, what kind of web app would I make (servlets?)? If I did, would I use the URL wrting method to transfer data?
I would want to use a http connection since I am using Glassfish.
Thanks
You can expose Restful API through the java web application; and access these api in your iOS app. There are many rest-client library for iOS now.
You can also write data to url connection directly, but it's tedious and complex.
I am currently developing an android application using eclipse and I already have a website developed in PHP and MySQL, can some one guide me how to connect to my website database through android for exchanging data
The simpliest, but maybe not so elegant way to do it, is writing special php-scripts for the queries, sending http requests from the android-app to these scripts and getting the results as json-arrays.
Check out this: http://www.helloandroid.com/tutorials/connecting-mysql-database
You need a Webservice Written Using REST Protocol or SOAP protocol or SimpleXML....
Using any of the above three links you may communicate throught Mysql DB to interact ur Android App Requests
To connect the Android Application to Webservices below given Two Links could be helpful
Android App Development and Web Server Interactions
interacting with web services and android
UPDATED
Below Link Might be most helpful to you.. chk it
Connection to DB from Android Device