Example updated with background upload and background fetch events