BOXOUT-THINKERS / TiOpenChat

Titanium open source chat mobile messenger app for iOS/Android using BaaS by BOXOUT THINKERS
Other
24 stars 10 forks source link

앱 완전 종료 시, notificationopen 이벤트 미작동 #5

Open YongHoonYun opened 8 years ago

YongHoonYun commented 8 years ago

안녕하세요 ! 많은 도움을 받고 있습니다.

푸쉬 쪽을 다 구현했다고 생각했는데, 테스팅 중 이슈가 하나 발생했습니다. 앱이 온라인이거나 백그라운드로 밀어낸 상태에서는 ParsePush.js 의 notificationopen 이벤트가 발생합니다만, 앱을 작업관리자에서 완전히 종료 시, notificationopen 이벤트가 작동하지 않습니다. 단순 앱 호출까지는 작동합니다만, 리스너는 죽어있는 상태가 되네요. 안드로이드에서는 pendingintent를 사용해서 구현했던거 같습니다만.. TiOpenChat 에는 해당 부분까지는 보이지 않아서요. 혹, 다른 우회방법이 있는가요 ? 다시금 조언 부탁 드립니다 !

gimdongwoo commented 8 years ago

모바일이라 자세한 답변은 어려운데요. https://github.com/gimdongwoo/Parse/blob/master/android/src/eu/rebelcorp/parse/ParseModuleBroadcastReceiver.java 여기 코드를 보시면 앱이 죽어 있을때는 startactivity를 할때 intent의 extra로 심어서 보냅니다. 그래서 API의 currentactivity를 이용해서 com.parse.data를 받아서 처리할 수 있습니다.

gimdongwoo commented 8 years ago

요기 답변 부분을 참고하세요. http://stackoverflow.com/questions/22934449/titanium-android-retrieve-intent-extras-through-notification