Created binder for service.

This commit is contained in:
Filip Strajnar 2024-10-19 13:49:25 +02:00
parent fa32356a9c
commit 3b40094457
2 changed files with 16 additions and 1 deletions

View file

@ -23,7 +23,7 @@ public class LocationLoggingService extends Service implements LocationListener
@Override
public IBinder onBind(Intent intent) {
return null;
return new LocationLoggingServiceBinder(this);
}
@SuppressLint("MissingPermission")

View file

@ -0,0 +1,15 @@
package com.proculite.logmylocation;
import android.os.Binder;
public class LocationLoggingServiceBinder extends Binder {
public final LocationLoggingService service;
public LocationLoggingServiceBinder(LocationLoggingService service){
this.service = service;
}
public LocationLoggingService getService(){
return this.service;
}
}