Out of the box sync service for mobile app - java

amazon-cognito
I have a mobile app that collects a lot of medical data from the user and every ~30 minutes needs to send the new data to the server.
I need 2 things:
1- Sync between the server and the app the data. If a user login from another mobile device he should get all of his past data and have full picture of his history.
2- the data that is being sync with the server should be store also on data base that I can query for analytics purposes.
What do you suppose to be the architecture ? What technologies do you recomend for that? I thought to use aws Cognito with Redshift but it is limited to 20 MB for each user.
My main question is there any out of the box sync service that i can copy it also for my BI DB like Redshift?

You should try the AWS Mobile Hub site. It will produce a sample app with the functionality you are talking about. You then click to download that sample app.
It will produce an IOS app in Objective-c or Swift, or an Android app (in java?).
It will sync up to 1M per user using Cognito Sync, but the app can also provide access to files through S3 or database through DynamoDB.

Related

Any way to efficiently sync two databases?

I am planning to make a software which requires two or more databases to be in sync with a main server database ( located on a web server ). Suppose one user have installed my software on more than one computers. Suppose he updates some info on PC-1 then the change should be locally updated and if he is connected with the internet, it should get in sync with the main web server. When he opens the software on PC-2, latest into must be shown there ( assuming he is connected with the internet ).
Now suppose both PC-1 and PC-2 have same data, and both are offline. User deletes the data from PC-1 but don't deletes it from PC-2 ( he assumes it'll get managed automatically ), now when both of the systems go online, the record must be deleted from PC-2 too.
Basically, I am trying to find the database which was most recently updated or modified and sync it with the main database ( on the server ). How can I do it ?
It sounds like you want to synchronize some user data whenever the users or application becomes "online" again.
A couple of suitable services are:
Amazon Cognito Sync is an AWS service and client library that enables cross-device syncing of application-related user data. You can use it to synchronize user profile data across mobile devices and the web without requiring your own backend. The client libraries cache data locally so your app can read and write data regardless of device connectivity status. When the device is online, you can synchronize data, and if you set up push sync, notify other devices immediately that an update is available.
AWS AppSync enables developers to interact with their data by using a managed GraphQL service. GraphQL offers many benefits over traditional gateways, encourages declarative coding style, and works seamlessly with modern tools and frameworks, including React, React Native, iOS, and Android. GraphQL is a data language that was developed to enable apps to fetch data from servers. It has a declarative, self-documenting style. In a GraphQL operation, the client specifies how to structure the data when it is returned by the server. This makes it possible for the client to query only for the data it needs, in the format that it needs it in.

How to send notifications depending on the Firebase data using Firebase Cloud Messaging

I have an app where people sign up for events and I want the app to notify the users registered for and event the day before it happens. All the data is stored in Firebase. So basically I would like to know how do I make my app read from Firebase the data from all the users in a regular basis and if a user is signed up for an event and the date is close send him a notification, without the admin having to do anything or using the console. Thanks
If you want to make this process automatic You can write Firebase cloud functions and can add triggers on nodes to execute cloud function, In that cloud function you can send push notifications using FCM depending upon your requirements. here are the helping links
Firebase Cloud Functions
Firebase Cloud Messaging
Otherwise if want to avoid cloud functions you can directly send message from App to App using FCM without involving server.
If you're looking to keep all of your server side logic running off of Firebase, the Firebase Cloud Functions are what you're looking for.
Here is the documentation for setting up functions to be run on a schedule: https://firebase.google.com/docs/functions/schedule-functions
If you're not looking to run your service from the Google Cloud, then the next best option is to setup CRON jobs if you're using a Unix based system, or the Task Scheduler if you're running a Windows based system.

Doubts related to Android wear development | Beginner

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.

What's the simplest way to request information from (own) other applications

The company that I work for has some small android applications running that communicate with their ERP software lately they requested to authenticate users and have sessions for safety reasons
Instead of integrating the autheticate and session code into every app (6) I want to build an Android app that acts like a dashboard. The app will authenticate the user, create a session and show the available apps on the device that the user can access with their user role.
The problem is I need the know which app requires which user role
I don't want to store this information in the dashboard app sinds that will require me to update the dashboard app each time i create or change an app
I was thinking or using an Content provider but that seems to be a lot of work and redundant since it has to be integrated into every app that I have (6)
So my question, is there a way to get data from apps that can easily be implemented. The data isn't big (only one Integer)
thanks in advance.

Host database using Android phone

Here is the current scenario:
I have two(2) Android phones.
Android Phone 1 as the server phone.
Android Phone 2 as the client phone.
Here is what I want to do:
I want to create an Android-based app (E.g. Student Information app) where it will have basically two (2) modes:
Server - for adding, editing and deleting data on a local database.
Client - for viewing data from the database of the server.
The app will be installed to Android Phone 1 and set to Server mode.
The app will be installed to Android Phone 2 and set to Client mode.
I want to ask these questions:
I want to locally host the database of the Server app, so that Client app will be able to view the data. Is this possible?
If yes, how can I do it?
Note:
I am currently a web developer so I know that connected on the same network is a requirement.
I have implemented the same concept on a medium business where the web-based system is locally hosted so that computers on the same network can access it.
Suggest everything that you want to suggest, except the disadvantage of doing this concept. I am aware of some obvious disadvantages based from my research and willing to face the disadvantages provided that I will be able to implement the concept.
Rooting the phones is an option.
I want to accommodate small-sized business that is why I want to use Android phones rather than using Desktop Computers/Laptop.
I have read similar suggested questions here based on my title.
We have done the exact same thing in my company. The way we solved this is that the server exposes a service using the Android NSD API, so the clients (using the same API) can find it on the network. And after a client has connected to the server, the server sends its database file (yes, the .db file in /data/data/...) to the client via OutputStream. When the client receives the entire database and checks for its integrity, it copies it to its own /data/data/... and restarts part of the app.
Android NSD

Categories