package Ġcom . vl ad im ir . bl tax i . sync Ċ Ċ import Ġandroidx . work .* Ċ import Ġjava . util . concurrent . TimeUnit Ċ Ċ private Ġconst Ġval ĠSY NC _ T AXIS _ WORK _ NAME Ġ= Ġ" sync _ t axis " Ċ Ċ class ĠSync T axis Work Manager ( private Ġval Ġwork Manager : ĠWork Manager ) Ġ{ ĊĠĠĠ Ġprivate Ġval Ġconstraints Ġ= ĠConstraints . Builder () ĊĠĠĠĠĠĠĠ Ġ. set Requires Device Idle ( true ) ĊĠĠĠĠĠĠĠ Ġ. set Requires Ch arging ( true ) ĊĠĠĠĠĠĠĠ Ġ. set Required Network Type ( Network Type . CONNECTED ) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠ Ġprivate Ġval Ġsync T axis Request Ġ= ĠPeriod ic Work RequestBuilder < Sync T axis Worker >( 1 , ĠTimeUnit . DAYS ) ĊĠĠĠĠĠĠĠ Ġ. setInitial Delay ( 1 , ĠTimeUnit . DAYS ) ĊĠĠĠĠĠĠĠ Ġ. set Constraints ( constraints ) ĊĠĠĠĠĠĠĠ Ġ. build () ĊĊĠĠĠ Ġfun Ġstart () Ġ{ ĊĠĠĠĠĠĠĠ Ġwork Manager . enqueue Unique Periodic Work ( SYNC _ T AXIS _ WORK _ NAME , ĠExisting Periodic Work Policy . KEEP , Ġsync T axis Request ) ĊĠĠĠ Ġ} Ċ } ĊĊĊ