Skip to content

Commit

Permalink
Update FlutterForegroundPlugin.java
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangJoo Park(박창주) authored Mar 10, 2021
1 parent ca34c51 commit 4ca9b0d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public void onMethodCall(MethodCall call, Result result) {
private void launchForegroundService(String icon, int color, String title, String content, String subtext,
Boolean chronometer, Boolean stopAction, String stopIcon,
String stopText) {
Intent intent = new Intent(activity, FlutterForegroundService.class);
Intent intent = new Intent(context, FlutterForegroundService.class);
intent.setAction(START_FOREGROUND_ACTION);
intent.putExtra("icon", icon);
intent.putExtra("color", color);
Expand Down Expand Up @@ -158,7 +158,7 @@ private void stopForegroundService() {

Intent intent = new Intent(context, FlutterForegroundService.class);
intent.setAction(STOP_FOREGROUND_ACTION);
activity.startService(intent);
context.startService(intent);
callbackChannel.invokeMethod("onStopped", null);
}

Expand Down

0 comments on commit 4ca9b0d

Please sign in to comment.