2014-11-07 2 views
0

내 응용 프로그램에 여러 활동이 있습니다. 막대에 알림이 표시되고이를 클릭하면 현재 배경에있는 활동에서 다시 시작됩니다.알림 및 현재 배경 활동 재개

현재 저는 이것을 사용하고 있지만, 항상 Launcher 활동 인 Home Activity로 이동하게됩니다. 같은 텐트 필터 응용 프로그램을 시작할 때 안드로이드가 사용으로

Intent intent =new Intent(ServiceClass.this, home.class); 
PendingIntent pendingIntent = PendingIntent.getActivity(GcmIntentService.this, 0, intent, 0); 
+0

집 활동 이외의 다른 활동을 시작하려는 또는 기존 홈 활동을 다시 시작 하시겠습니까 것을 의미 함 화면? –

+0

앱이 백그라운드로 이동 한 곳에서 활동을 다시 시작하고 싶습니다. 날씨 그것은 가정 활동이나 다른 활동입니다 – user1534364

+0

이 링크를 참조하십시오 : http://stackoverflow.com/questions/5502427/resume-application-and-stack-from-notification –

답변

0

사용 :

final Intent notificationIntent = new Intent(context, YourActivity.class); 
    notificationIntent.setAction(Intent.ACTION_MAIN); 
    notificationIntent.addCategory(Intent.CATEGORY_LAUNCHER); 
+0

내 주요 활동은 splashActivity입니다, 그것은이 활동에서 나를 데려갔습니다 현재 활동에서 재개하는 대신 – user1534364