public void onMessageReceived(RemoteMessage remoteMessage) {
Context context = getApplicationContext().getApplicationContext();
((Activity)context).finish();
}
앱이 실행중일때 푸쉬가 오면 앱을 finish 시키려고 합니다.
java.lang.ClassCastException: 패키지이름 cannot be cast to android.app.Activity
위와 같은 에러가 나고 있습니다 서비스에서 앱을 종료 시키지 못할까요 ?!