2012-12-16 2 views
0

나는 윈도우 폰 8 앱을 쓰고있다.windows phone 8 app Application_Activated() never called

방금 ​​애플 리케이션으로 전환 할 때마다 (처음이든 아니든 상관없이 홈을 치고 다시 돌아와서 앱 타일을 치면) Application_Launching()이 호출됨을 알게되었습니다. 반면에 Application_Activated()는 호출되지 않습니다.

내가 잘못한 게 있는지 궁금합니다.

// Code to execute when the application is launching (eg, from Start) 
    // This code will not execute when the application is reactivated 
    private void Application_Launching(object sender, LaunchingEventArgs e) 
    { 
     Log.AppLaunch(); 
    } 

    // Code to execute when the application is activated (brought to foreground) 
    // This code will not execute when the application is first launched 
    private void Application_Activated(object sender, ActivatedEventArgs e) 
    { 
     Log.AppActive(); 
    } 

답변

2

예상대로 - 시작 화면에서 앱 타일을 탭하여 항상 앱의 새로운 인스턴스를 시작합니다.

Application_Activated 메서드를 테스트하려면 HOME 키를 누른 다음 하드웨어 뒤로 키를 눌러야합니다. 하드웨어 백 키를 오래 누르고 있으면 최신 응용 프로그램 목록을 얻을 수 있습니다. 이렇게하면 다시 돌아갈 수 있습니다.

+0

사실 앱 타일을 누르면 새로운 시작이되고, 다시 키를 누르면 다시 활성화됩니다. 고마워. – Roy