How to pass Array ArrayList to Service

I have a Arralyst file in my MainActivity but I want to pass my Service but I can’t, I don’t know how to do it and I’ve already see this post: How to pass ArrayList<File> object from one Activity to another Activity using Intent?, and doesn’t works because getIntent() Android Studio didn’t recognize it

Code

 public void SendToService(){
    Intent service=new Intent(MainActivity.this,ForegroundService.class);
    if(ForegroundService.IS_SERVICE_RUNNING){

        AdapterService=recibidor_file;


        service.setAction(Constantes.ACTION.DATA_ACTION);
        ForegroundService.IS_SERVICE_RUNNING=true;

        service.putExtra("key",AdapterService);

        startService(service);

    }

Server

recibidor=(ArrayList<File>)intent.getExtras().getSerializable("key");