Foreground Service Integration

- Add Foreground Service
- Reviewed Progress Method
- Reviewed Transfer Object Integration
- Fix Some Error
This commit is contained in:
lionel
2021-03-14 19:40:41 +01:00
parent 493e836f56
commit 168e01e09a
7 changed files with 515 additions and 495 deletions

View File

@ -17,7 +17,6 @@ public class TransferService extends Service {
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
int id = intent.getIntExtra("id", 0);
Intent notificationIntent = new Intent(this, MainActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(this,
@ -27,7 +26,7 @@ public class TransferService extends Service {
.setContentIntent(pendingIntent)
.build();
startForeground(id, notification);
startForeground(Transfer.NOTIF_SERVICE, notification);
//do heavy work on a background thread
//stopSelf();