mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-24 05:04:50 -04:00
Add handler before startServerDialog
This commit is contained in:
parent
b459886e9d
commit
e45f36d29e
@ -1099,7 +1099,15 @@ public class MainActivity extends BaseActivity implements WebViewCallback,
|
||||
builder.setNeutralButton(getString(R.string.hotspot_dialog_neutral_button), (dialog, id) -> {
|
||||
//TO DO: START SERVER WITHIN THE SERVICE.
|
||||
WebServerHelper webServerHelper = new WebServerHelper(this);
|
||||
webServerHelper.startServerDialog();
|
||||
//Adding a handler because sometimes hotspot can take time to turn on.
|
||||
//TO DO: Add a progress dialog instead of handler
|
||||
final Handler handler = new Handler();
|
||||
handler.postDelayed(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
webServerHelper.startServerDialog();
|
||||
}
|
||||
}, 5000);
|
||||
});
|
||||
|
||||
builder.setTitle(getString(R.string.hotspot_dialog_title));
|
||||
|
Loading…
x
Reference in New Issue
Block a user