Question regarding retrieving pushed notification

I’ve managed to use the following code to get pushed notifications:

sensor_events = LAMP.SensorEvent.all_by_participant(participant_id, origin=“lamp.analytics”)[‘data’]

notifications = [i[‘data’] for i in sensor_events if i[‘data’].get(‘action’) is not None and i[‘data’].get(‘action’) == ‘notification’]

However, it doesn’t seem to record every single notification that is sent – for example I can’t see any of the notifications sent today (6th October 2021) when testing – the last notification I can see was on the 29th September:

{‘timestamp’: 1632931564754, ‘sensor’: ‘lamp.analytics’, ‘data’: {‘action’: ‘notification’, ‘device_type’: ‘iOS’, ‘user_agent’: ‘NativeCore 2021.7.6; iOS 14.4; iPhone iPhone10,3’, ‘content’: {‘expiry’: 86400000, ‘aps’: {‘content-available’: 1, ‘alert’: 'Activity for next week: 1. run for 30 mins; 2. jump 20 times; 3. swim for 40 mins; 4. sprint 3 times; 5. sit for 3 mins, 6. walk for 30 mins; 7. sleep for 60 mins; 8. deep breath for 2 mins; 9. stand for 10 mins; 10. drink water 200ml. ', ‘mutable-content’: 1, ‘badge’: 0, ‘sound’: ‘default’}, ‘actions’: [], ‘notificationId’: 'Activity for next week: 1. run for 30 mins; 2. jump 20 times; 3. swim for 40 mins; 4. sprint 3 times; 5. sit for 3 mins, 6. walk for 30 mins; 7. sleep for 60 mins; 8. deep breath for 2 mins; 9. stand for 10 mins; 10. drink water 200ml. '}}}

I’ve also tried filtering by timestamp with “_from” and “to” inside that LAMP.SensorEvent.all_by_participant() function but to no avail.

Thanks very much and look forward to hearing from you.

Hi ZLI,

Thank you for reaching out to us. It looks like your code is set up correctly, so it seems that there may be another issue.

I will pass this along to our app development team. Could you confirm a) the type of device you are using (iPhone, Android, etc.), and b) whether the app was logged in to LAMP and received the notification as expected at the time it should have?

Let me know if there are other questions we can answer.

Best,
Luke

Thanks Luke. Below are my answers to your questions:

a) I am using iPhone.
b) The app was logged in and received the notification as expected at the time it should have (on 6th October)

Best,

ZLI

Thanks for the info ZLI. I don’t see any issues with your process so I will pass this bug report along to our development team. In the meantime, please let us know if there is anything else we can do or any other questions we can answer.

Best,
Luke

Dear Luke,

Thanks very much for your reply. In addition, I also want to see if the mindlamp platform provides a scheme for continuous monitoring and intervention delivery. I have checked the webpage Continuous Monitoring & Intervention Delivery | LAMP Platform and find that direct contact to the team is required. I am looking forward to hearing from you soon.

Best wishes,

ZLI

Hi ZLI,

Glad to help! With regards to continuous monitoring and intervention delivery, we are currently working on and finalizing a public version. However, it is unfortunately not available to the public as of yet. We hope to have it working and publicly available within the next 2-4 weeks.

If you would like, I can post an update here when the initial public release is made.

Best,

Luke