http - Best solution for waiting on response in Android? -


i want create android background service, creates notification, if server has restarted, need ideas how implement it.

i thought http connection, background service waits until message comes in, think connection can not keep while restart. after there came new idea, background service pushes notification, when connection breaks.

would possible (if yes, easiest way) or there better way solve this?

create asynchronous task tries connect server in endless loop. use time limit cancel process after given time or return ok value if server responds 200.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -