Alarm with Sqlite database - alarmmanager

hey i am developing an reminder app so i managed to create the alarm from the table inside the database and with the notification with cols (ReminderID,ReminderTitle,activeOrNot,day,week,......)
here is the deal am setting the alarm from the table with for loop and it only query the setted active alarm
but the thing is when the notification pops to the user when he click on the notification and to map the auto increment Reminder ID in the database just need the notification id which appeared to the user set before and set the alarm not active so when setting further alarms it doesn't see the already notified alarm
am using Pendingintent.getbrodcast to set the notification
thanks

so i got the solution for this thing after 4 days
when you are setting the alarm you should have the receiver class and when assigning the PendingIntent
i put extras the notif id for the intent and i created a class to receive the bundle with the extras and it contains the notif ID and updated to the database

Related

process remind to user on exact date and time in django

So I have notification system in place.For example when sending a task to user, user get a notification within my system. Right now I have only "instant" notifications. so when I send a task to someone, a notification is created in the db, and via web-socket the user is notified with the data of the notification.
With the Reminder I have the problem, that the notification I want to send here is not necessarily "instant". I want to set the date to next Monday on 9 am. so User should receive the notification on Monday 9 am.
Question: Is there an extension in django (or onboard methods) where I can execute stuff delayed? For example, send notification with the following data on Monday 9 am.
Celery can be used to schedule and defer tasks.
Here's and example of how to schedule for a specific time. https://docs.celeryq.dev/en/latest/userguide/calling.html#eta-and-countdown

DynamoDB sends multiple update event and my lambda is called multiple times

I've got a DynamoDB in AWS and it has a trigger on it with an AWS Lambda connected.
I need to send an email when a status reaches a particular value and it's done checking the EventName=="MODIFY" and the newImage["Status"] value.
What currently happens is that the event is fired 3 times and so 3 emails are sent...
I thought to set a value on DynamoDB telling that I've already sent an email, but doing so another trigger is fired and I don't know if the time between events is enough to perform this update... anyone has got this issue before? how did you handle it?
Thanks

Is it possible to kick off two different cloud build which are based on subscription to same topic?

currently i have a cloud-build application which is being kicked off by a pub-sub trigger , subscribing to eg. topic1
I would like to know if i can kick off another cloud-build application from subscribing to the same topic. Is there a way to configure the message (or the trigger) so that if message1 is published to topic1, then cloudbuild1 is kicked off, and if message2 is published to topic1, then cloudbuild2 is kicked off?
Kind regards
marco
When you create a subscription on a topic, all the published messages in the topic are replicated in each subscription.
Therefore, if you have TOPIC and Sub1 and Sub2, if you publish 1 message in TOPIC, you will have this message in Sub1 and Sub2.
However, you can set up a filter on messages when you create a subscription. You can set this filter only at the creation and you can't update it later. You need to delete and recreate the subscription if you want to update the filter.
In addition, you can filter only on message attributes, not on the message body content.
Therefore, with filter, think wisely your filter from the beginning and when you publish a message in TOPIC, add attributes that allow your to route the messages to the correct subscription.

How can I know whether user clicked on notification or not?

my tried wayI am trying to know when i am sending push notification to users they will open the notification or not. i am able to get the number of sent notification or number of successful and failed notification but i am unable to get the user response record.I am using aws sns push notification with fcm
it's easy!
Just put a little code in notification code, when user clicked the notification it gets the value from the database which is 0 when you start sending the notification, and add +1 in it and again store that value in the database.
This is the simple way you can check how many people open your notification.
Regards,
Sameer Rehman

Does AppSync Subscription Work When User is No Longer in View Controller or when App is Background

I am reading this sample app, and noticed that the call for subscriptions happens in viewDidLoad(). This raises the following question:
1) Is the user subscribed to event comments only when he/she is in that particular view controller? In other words, if the user navigates to another scene, is the subscription no longer in effect? How can I make it so that once a user subscribes to something, he/she is subscribed to it until told to stop?
I also have another question:
2) Can I changed the parameters passed to a subscription during the app? For instance, if I am subscribing to multiple events, then I would pass an array of event_id as parameter. For some condition, I will add an event to the array. So each time I add an event, do I have to restart the subscription?