-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to observe Datastore Model Realtime on background or after killing application #1488
Comments
What type of datastore events are you hoping to listen to? If you wish to subscribe to operations involving a specific type of model (e.g. new If what you wish to do is to subscribe to generic DataStore events (e.g. DataStore is now finished syncing remote models locally), then you can use our Hub category to subscribe to those events and act on them. |
@raphkim Yeah actually i am talking about to observe specific type of model like i mentioned - Messages::java.class - |
It looks like I misunderstood the original question! I apologize for that. Amplify Android currently does not support realtime observation while the app is in the background. We will track it as a feature request and prioritize it based on how much traction it receives. |
@raphkim ok thanks |
Push notification to achieve your use case will be better strategy. |
Hey guyz!! I want to observe my model if the application is in background or if user killed the application from recent apps.
In that case please let me know the best approach for listening to datastore events.
I Tried some ways but due to background restrictions in android none of the method is working correctly..
Any solution??
Amplify.Datastore.observe(Messages::java.class, {},{},{},{})
The text was updated successfully, but these errors were encountered: