I am new to Android Application Development and know all the stuff, which is required to build an Application which can use the local resources (databases and all that stuff). I want to build an Application, which will interact with the Application server. And I chose Google App Engine as my Application server. As I am slightly new to this topic, I just want to know, what are the prerequisites for doing both client and server side programming.
I would require to store some data on Google App Engine and interact with the apps with reference to the same.
P.S. I have chosen Java as my language with Google App Engine.
I don't think that there is any prerequisites for using android with google app engine.
Google App Engine is a PAAS, u can write the server side and it should work irrespective of Android, iPhone or any other device. For data transfer you can use XML or JSON format, see this if u are interested in creating REST services.Create and Deploy a JAX-RS REST service on Google App Engine
For data transfer from server to android device, u can use Google Cloud Messaging Google Cloud Messaging for Android
Related
I have built a Java Spring Application. This application in the end after doing its work pushes data to a sqlite database.
Now the functionality that i want to add is: Once data is pushed into db, i want to send a custom notification on an app running on android wear. This custom notification should have a message and some options for user to respond to. Finally on seeing the notification on android wear the user should select one of the options and that should be stored in a database.
As i am new to android development, I cannot understand three things:
1. What kind of android application should i develop?
2. How can this android application receive some message or data from some other service (in my case java application)?
3. How to save user response to database?
Some guidance would be really appreciated.
Thanks
I will try to answer all your questions. If your current Java application is a web app, then you will end up building a mobile/wearable app that will communicate to this web app. If your current Java application is not a web app, you will either have to integrate its logic into the mobile/wearable app directly or turn it into a web app so it can communicate with the mobile/wearable app.
You will end up developing two Android apps, essentially. A mobile app for the mobile device and a wearable app that will communicate with the mobile app. This can all be done in Android Studio and in one project though, so it will basically be one application at the end of the day.
Like I mentioned above, you will have to either integrate that existing application's logic directly into your new Android mobile app, or turn your Spring app into a web app and host it on a server that your Android mobile app can call out to to get data.
Android has the concept of local databases and can actually use SQLite on the device. This is most likely how you would store the response from your service.
According to the documentation of Google App Engine in this URL https://cloud.google.com/appengine/docs/java/sockets/
It said:
Sockets are only available for paid apps, and traffic from sockets is billed as outgoing bandwidth.
My questions is that, Is this paragraph includes iOS Apps too? If Yes, what does that mean?
Google App Engine is simply a web host. The code you deploy there doesn't run on any devices- it runs in the cloud and clients can talk to it. Whatever you deploy there typically offers up content over HTTP, which any type of client can understand.
That paragraph is talking about billing for your web application, that is, the code deployed on your Google App Engine instance.
Thus to serve up content using sockets, you need to have a paid Google App Engine instance. "Apps" does not refer to the client applications.
I am building android app1 and app2, which will send data to each other based on this tutorial. The tutorial on GCM and xmpp is pretty straightforward. Google requires 3rd party server app with a backend to send upstream and downstream data to and from the android apps, which is something I couldn't understand. Should that app be an android app to? Or java app on a desktop(because it should run always nonstop)? I couldn't find a tutorial on building that server app. Can someone give me a hint or example?
I'm developing java desktop application that communicates with MySQL database via JDBC.
I want to develop an android application that will use Web services to access data in the same database.
Is there a way to tell android app from my desktop app when to invoke web service (I want all changes that i have committed from desktop app on database to show in android app)?
Which is the best way to implement this?
Is it possible to send parameters from desktop to android via socket and then in socket thread in android app to invoke web service? Is this good approach?
the best way to do this is with an SOA approach. use a j2ee container, and expose your services by web services. then android can directly use those over http.
alternatively, you can use jdbc in android just as you use jdbc in the desktop application.
You can use Google Cloud Messaging. GCM is perfect for doing this type of data syncing. To achieve that you can do the following
Register your android app with the GCM server and save the ID in your database.
Send a push notification from your desktop app or web service to your android app by taking the ID from your database at the time of update.
Simply invoke the web service in your android app when you get the message from GCM server.
Here is an implementation of GCM server & client.
Google App Engine has a great XMPP service built in. One of the few limitations it has is that it doesn't support receiving messages from a group chat. That's the one thing I want to do with it. :(
Can I run a 3rd party XMPP/Jabber server on App Engine that supports group chat?
If so, which one?
No. App Engine apps can only directly handle HTTP requests - you can't run arbitrary servers on App Engine.