package Ġcom . the cool gu y . rum aan . file io . network Ċ Ċ import Ġandroidx . work . Constraints Ċ import Ġandroidx . work . Data Ċ import Ġandroidx . work . Network Type Ċ import Ġandroidx . work . One Time Work Request Ċ import Ġandroidx . work . One Time Work RequestBuilder Ċ import Ġcom . the cool gu y . rum aan . file io . repository . Upload Worker Ċ Ċ const Ġval ĠUP LOAD _ WORK _ TAG Ġ= Ġ" Upload Work " Ċ Ċ fun Ġcreate Work Request ( uri : ĠString ): ĠOne Time Work Request Ġ{ ĊĊĠ Ġval Ġdata Ġ= ĠData . Builder () ĊĠĠĠĠĠ Ġ. putString ( Upload Worker . KEY _ URI , Ġuri ) ĊĠĠĠĠĠ Ġ. build () ĊĠ Ġval Ġconstraints Ġ= ĠConstraints . Builder () ĊĠĠĠĠĠ Ġ. set Required Network Type ( Network Type . CONNECTED ) ĊĠĠĠĠĠ Ġ. build () ĊĊĠ Ġreturn ĠOne Time Work RequestBuilder < Upload Worker >() ĊĠĠĠĠĠ Ġ. apply Ġ{ ĊĠĠĠĠĠĠĠ Ġset Constraints ( constraints ) ĊĠĠĠĠĠĠĠ Ġset InputData ( data ) ĊĠĠĠĠĠĠĠ Ġadd Tag ( UPLOAD _ WORK _ TAG ) ĊĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġ. build () Ċ } Ċ