I have this code:
Intent publishIntent = new Intent(HistoryDoneVsPlanned.this, MyIntentService.class);
publishIntent.putExtra(HistoryMap.KEY_WORKOUT_ID, workoutId);
where HistoryDoneVsPlanned is my current Activity and MyIntetService is a IntentService.
and my goal is pass the current context of the activity at the intentService like this:
publishIntent.putExtra("CONTEXT", HistoryDoneVsPlanned.this);
but is not possible.
Is a good practice? I need make the Toast and notification into another class (not Activity) and I need the context of the activity.