-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6ff077
commit 58fcd4c
Showing
9 changed files
with
184 additions
and
225 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
58fcd4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
見つかった問題点、修正点
・そもそもDataApiのリスナー登録をしていない→登録
・送信部と受信部を結合
・三つ巴デッドロック→ハンドラに→仮にセンサデータがなくても定期的に空パケ送信して受診に行くようにした
・onDataChangedが最初呼ばれない→ダミーの更新を1回入れた→changedだから作成は含まれない…?
・onDataChangedはパス単位での通知なのでどのキーが更新されたかはわかりませんぞ→どの更新なのか判別するならパスを変えるしかない→めんどいので気にしない
・ハンドラが停止しない→そもそもonStopもonDestroyもon(ryも呼ばれてない→IntentしてもActivityはスタックにたまるだけで消えません
・無言落ち→メモリ不足→Activityがスタックに溜まり続けるから
・Intentフラグを変え、常にスタッククリーンするようにした
・GoogleAPIClientのリスナーは1つしか受け付けない模様(スタックの関係で消えることもない)→登録してもコールバックが呼ばれないので悩んだ→めんどいのでメインActivity以外はリスナー登録しないようにした