java - Error:(124, 9) error: method does not override or implement a method from a supertype -


i'm trying develop complete android login registration system php , mysql android. if user forget password, new password send e-mail. follow tutorial.

forgetpassword

 email = (edittext) findviewbyid(r.id.forpas);           forgetpassword.setonclicklistener(new view.onclicklistener() {                      @override                     public void onclick(view v) {                         if ((name.gettext().tostring().trim().length() == 0) || (email.gettext().tostring().trim().length() == 0)) {                             toast.maketext(getapplicationcontext(), "name or e-mail cannot null", toast.length_long).show();                             return;                         } else {                             netasync();                         }                      }                 });       private class netcheck extends asynctask          {             private progressdialog ndialog;              @override             protected void onpreexecute(){                 super.onpreexecute();                 ndialog = new progressdialog(forgetpassword.this);                 ndialog.setmessage("loading..");                 ndialog.settitle("checking network");                 ndialog.setindeterminate(false);                 ndialog.setcancelable(true);                 ndialog.show();             }              @override             protected boolean doinbackground(string... args){                  connectivitymanager cm = (connectivitymanager) getsystemservice(context.connectivity_service);                 networkinfo netinfo = cm.getactivenetworkinfo();                 if (netinfo != null && netinfo.isconnected()) {                     try {                         url url = new url("http://www.google.com");                         httpurlconnection urlc = (httpurlconnection) url.openconnection();                         urlc.setconnecttimeout(3000);                         urlc.connect();                         if (urlc.getresponsecode() == 200) {                             return true;                         }                     } catch (malformedurlexception e1) {                         // todo auto-generated catch block                         e1.printstacktrace();                     } catch (ioexception e) {                         // todo auto-generated catch block                         e.printstacktrace();                     }                 }                 return false;              }             @override             protected void onpostexecute(boolean th){                  if(th == true){                     ndialog.dismiss();                     new processregister().execute();                 }                 else{                     ndialog.dismiss();                     toast.maketext(getapplication(),"error in network connection",toast.length_long).show();                     //alert.settext("error in network connection");                 }             }         }          private class processregister extends asynctask {              private progressdialog pdialog;              string forgotpassword;             @override             protected void onpreexecute() {                 super.onpreexecute();                 forgotpassword = email.gettext().tostring();                  pdialog = new progressdialog(forgetpassword.this);                 pdialog.settitle("contacting servers");                 pdialog.setmessage("getting data ...");                 pdialog.setindeterminate(false);                 pdialog.setcancelable(true);                 pdialog.show();             }              @override             protected jsonobject doinbackground(string... args) {                  userfunction userfunction = new userfunction();                 jsonobject json = userfunction.forpass(forgotpassword);                 return json;              }              @override             protected void onpostexecute(jsonobject json) {                 /**                  * checks if password change process sucesss                  **/                try {                     if (json.getstring(key_success) != null) {                         //alert.settext("");                         string res = json.getstring(key_success);                         string red = json.getstring(key_error);                          if(integer.parseint(res) == 1){                             pdialog.dismiss();                           //  alert.settext("a recovery email sent you, see more details.");                             toast.maketext(getapplication(),"a recovery email sent you, see more details",toast.length_long).show();                          }                         else {                             toast.maketext(getapplication(),"error",toast.length_long).show();                         }                     }}                 catch (jsonexception e) {                     e.printstacktrace();                  }             }} 

error

error:(108, 13) error: forgetpassword.netcheck not abstract ,  not override abstract method doinbackground(object...) in  asynctask error:(124, 9) error: method not override or implement  method supertype error:(164, 13) error:  forgetpassword.processregister not abstract , not override  abstract method doinbackground(object...) in asynctask 

you haven't provided types asynctask when declaring netcheck, trying override doinbackground(string... args) , change to:

private class netcheck extends asynctask<string, integer, boolean> 

likewise change declaration of processregister to:

private class processregister extends asynctask<string, integer, jsonobject> 

check docs here more info


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -