Commit 26d87fae by Kim Jinsung

インターネット接続チェック共通化

parent 7f81681f
...@@ -977,4 +977,21 @@ public abstract class ABVActivity extends Activity { ...@@ -977,4 +977,21 @@ public abstract class ABVActivity extends Activity {
} }
return true; return true;
} }
/**
* ネットワークチェックして非接続時にダイアログ表示
* @return true:接続、false:非接続
*/
protected boolean checkNetworkConnected() {
if (!ABVEnvironment.getInstance().networkAdapter.isNetworkConnected()) {
handler.post(new Runnable() {
@Override
public void run() {
showSimpleAlertDialog(R.string.app_name, R.string.msg_network_offline);
}
});
return false;
}
return true;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment