yandexmapkit-android icon indicating copy to clipboard operation
yandexmapkit-android copied to clipboard

Why AsyncTask is not executed from OnMapListener.onMapActionEvent(...)

Open andrew-ew opened this issue 10 years ago • 4 comments

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?

andrew-ew avatar Feb 05 '15 17:02 andrew-ew

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);

ABIvan-Tech avatar Feb 07 '15 20:02 ABIvan-Tech

Thanks, i will try. But in other places execute method works just well.

andrew-ew avatar Feb 08 '15 05:02 andrew-ew

Unfortunately this doesn't work.

andrew-ew avatar Feb 12 '15 05:02 andrew-ew

i am working on this mapkit, do you know how to set marker's click event?

douyn avatar Dec 08 '15 03:12 douyn