Skip to content

Instantly share code, notes, and snippets.

@tateisu
Created November 1, 2018 23:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tateisu/fa382f751080fa1c7b94a3d34a48f59d to your computer and use it in GitHub Desktop.
Save tateisu/fa382f751080fa1c7b94a3d34a48f59d to your computer and use it in GitHub Desktop.
通知を出す
アプリを終了する
通知タップ
>D/SubwayTooter:ActCallback: onCreate flag=10000000
>D/SubwayTooter:ActMain: onCreate
>D/SubwayTooter:ActMain: handleIntentUri subwaytooter://notification_click/?db_id=7
別のカラムを表示
アプリを終了する
履歴からアプリを開く
>D/SubwayTooter:ActCallback: onCreate flag=10100000
>D/SubwayTooter:ActMain: onCreate
>D/SubwayTooter:ActMain: handleIntentUri subwaytooter://notification_click/?db_id=7
STのActivity構成
- ActMain :UIから起動するActivity
- ActCallback :通知や外部アプリから起動するActivity
ActCallbackのonCreate で Intent.FLAG_ACTIVITY_LAUNCHED_FROM_HISTORY (0x00100000) を見ると判別できるらしい
@tateisu
Copy link
Author

tateisu commented Nov 2, 2018

前提条件として saveInstanceState ==null というのがある (アプリ終了ではなく一時的に破棄されてから復元したら saveInstanceState !=nullになる) けどね

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment