I think you could just remove the existing stored last ping timestamp, it's definitely hacky feeling but the following snippet should work from the glean-sample app if you added it in the `buttonSendPing.setOnClickListener {...}` before it simulates the background event. ``` applicationContext.getSharedPreferences("MetricsPingScheduler", Context.MODE_PRIVATE) .edit() .remove("last_metrics_ping_timestamp") .apply() ``` I'm working on using WorkManager to start sending the pings, maybe I can add a way to override and force sending of the metrics ping. From a functionality standpoint, that might make sense to have a way to override a schedule.
Bug 1525333 Comment 1 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I think you could just remove the existing stored last ping timestamp, it's definitely hacky feeling but the following snippet should work from the glean-sample app if you added it in the `buttonSendPing.setOnClickListener {...}` in the glean-sample MainActivity. ``` applicationContext.getSharedPreferences("MetricsPingScheduler", Context.MODE_PRIVATE) .edit() .remove("last_metrics_ping_timestamp") .apply() Glean.handleEvent(Glean.PingEvent.Default) ``` I'm working on using WorkManager to start sending the pings, maybe I can add a way to override and force sending of the metrics ping. From a functionality standpoint, that might make sense to have a way to override a schedule.