java - AsyncTask must be abstract -
i'm pretty new asynctask on android, i'm trying pass int
new starttestasync().execute(grayval);
to asynctask
public class starttestasync extends asynctask<integer, void, void> { double[] timearray = new double[500]; // set array double lagstarttime; double lagendtime; double lagtimeresult; int testamount; protected void doinbackground(int...grayval) { (testamount = 0; testamount < 500; testamount++) { lagstarttime = system.nanotime(); //start lagtimer start while (grayval >= 100) { log.i("mat value", string.valueof(grayval)); lagendtime = system.nanotime(); } } }
android studio says "asynctask must abstract", have no idea how fix new asynctasks.
edit: full code http://pastebin.com/vrf8rb3h
from documentation:
asynctask must subclassed used. subclass override @ least 1 method (doinbackground(params...)), , override second 1 (onpostexecute(result).)
that means, have override method onpostexecute(result) too:
protected void onpostexecute(long result) { //do }
Comments
Post a Comment