Closed billmeek closed 11 years ago
@dmfrey, I can get everything but the stopProbe() part, any suggestions?
private void startProbe() throws IOException {
Log.v( TAG, "startProbe : enter" );
if( zeroConf != null ) {
stopProbe();
}
try {
mProgressDialog = new ProgressDialog( wrActivity.get() );
mProgressDialog.setTitle( getString( R.string.please_wait_title_str ) );
mProgressDialog.setMessage(getString( R.string.preference_home_profiles_scan_scanning ) );
mProgressDialog.setCancelable(false);
mProgressDialog.setButton(DialogInterface.BUTTON_NEGATIVE, getString( R.string.btn_cancel ), new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
//stopProbe(); <---------------------------------------------------------------------
dialog.dismiss();
}
});
mProgressDialog.show();
} catch( Exception e )
@billmeek is the onclick not being called? If not it's probably related to setCancelable(false).
@pot8oe, pretty vague report on my part. No eclipse just wasn't letting me use stopProbe() inside onClick(). Wrapping the stopProbe() inside of a try/catch got me past that problem. And it seems to work. With no mythbackend running, I get the option to Cancel and when I start a backend, the probe isn't running so I don't get a setup screen asking to Save/Cancel.
If this makes sense, I'll push it and find the case the beta user reported.
@billmeek Yes, this makes sense. Please commit the changes.
On Thu, Oct 17, 2013 at 8:46 AM, billmeek notifications@github.com wrote:
@pot8oe https://github.com/pot8oe, pretty vague report on my part. No eclipse just wasn't letting me use stopProbe() inside onClick(). Wrapping the stopProbe() inside of a try/catch got me past that problem. And it seems to work. With no mythbackend running, I get the option to Cancel and when I start a backend, the probe isn't running so I don't get a setup screen asking to Save/Cancel.
If this makes sense, I'll push it and find the case the beta user reported.
— Reply to this email directly or view it on GitHubhttps://github.com/MythTV-Clients/MythTV-Android-Frontend/issues/234#issuecomment-26500860 .
My Google Profile http://www.google.com/profiles/dmfrey
If there is a network problem, or the backend isn't running, or in the case of skd5aner on the MythTV users channel when switching from WiFi to his phones 4G, the ProgressDialog doesn't exit.
Ideally, there would be three changes:
1.Use a STYLE_HORIZONTAL rather than a spinner (perhaps a 60 second timer)
hostname
that's being contactedI can find two places where the involved ProgressDialog text appears: