开发者

AsyncTask Bug on HTC Sense

开发者 https://www.devze.com 2022-12-21 20:45 出处:网络
Im using HTC Hero with HTS sense. Im experience that sometimes AsyncTask not will run doInBackground method on execute();

Im using HTC Hero with HTS sense.

Im experience that sometimes AsyncTask not will run doInBackground method on execute();

Its only on my Hero this appears. Someone have come across sam开发者_StackOverflow社区e problem?

/ Martin


Not this problem but while developing for the HTC Hero I have come across several bugs that are not found in any vanilla version of Android.

Namely, Outgoing Call Intent is not sent when a call is dialled from the HTC Sense dialer, this is in the latest HTC Hero build and not earlier ones.

And the phone icon appears in the recently used apps screen alongside a dialer icon which when pressed(dialer icon) causes major problems.

Contact HTC with your bug and provide them with the logs, I have done so with the bugs I have found.

This was nearly 2 weeks ago and I've had no feedback though


What you should do is to add the @Override flag to the doInBackground(Void... params){}; function to ensure that it actually overrides the default function.

Like:

@Override
public Void doInBackground(String... params) {
 // Do something
}

An important side-note is to match the parameter-classes of the functions as to those defined in your classdefinition.

public class FetcherManager extends AsyncTask<Url, Integer, Long>{};

@Override
public Long doInBackground(Url... params) {
    // Do things
};

@Override
protected void onProgressUpdate(Integer... progress) {
   // Do things
}

@Override
protected void onPostExecute(Long result) {
   // Do things
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号