0

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

1 Answer 1

1

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.

  1. 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.

  2. 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.

  3. 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.

Sign up to request clarification or add additional context in comments.

3 Comments

Thanks @rickjerrity. Yes its a java spring web application
Hey @rickjerrity, in your 2nd point you have said that the android app can call out to get data. Actually what i want is that android app should get notification by it not making the requests. That is once data is pushed in db from java web application, it should...you know push some message which some listeners like android wear which are listening and hence gets notification. How can that be done?
@RahulLao that's really another question entirely, which I or someone else would be happy to help you with, or I'm sure has already been answered here. What you're looking for though, is 'push notifications'. Probably using Firebase Cloud Messaging which will push to the mobile device, and then push to the wearable device.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.