yandexmapkit-android
yandexmapkit-android copied to clipboard
Why AsyncTask is not executed from OnMapListener.onMapActionEvent(...)
My activity implements OnMapListener. In onMapActionEvent(...) I want to execute AsyncTask:
@Override public void onMapActionEvent(MapEvent mapEvent) { new MyAsyncTask().execute(); }
But for unknown reasons task is not executed - doInBackground() is not executed. Does anybody know why?
try this if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) new MyAsyncTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, (Void[]) null); else new MyAsyncTask().execute((Void[]) null);
Thanks, i will try. But in other places execute method works just well.
Unfortunately this doesn't work.
i am working on this mapkit, do you know how to set marker's click event?