Storing 1000+ data on SQLite resulting UI Hang

Issue I need to insert big data on our SQLiteDatabase from our server’s response. But until now I’m still confuse on AsyncTask() and I want some clarifications on it. Here is my complete code on using AsyncTask(). I use AndroidNetworking library for an HTTP Request class ProgressAsync extends AsyncTask<String, String, Boolean> { boolean result false; … Read more

iOS: How to load an object in a mapview depending on which annotation was tapped?

Issue I have an app with a mapview containing various building objects (my own class). Each building has an annotation property which all works great and the user can search a table for the desired building, tap a button and it’ll show the relevant annotation. Now I have a callout button on the annotation which … Read more

Is it possible to call doInBackground from onPostExecute?

Issue @Override protected void onPostExecute(String s) { super.onPostExecute(s); asyntask.execute(); } I’m reading data from some API. Is it possible to call doInBackground() from onPostExecute? I want do it recursively like (network task and update in UI ) for 5 times. Thanks in advance. [by Taboola]( Article Thumbnails:)[by Taboola]( Article Thumbnails:) [Sponsored Links]( Article Thumbnails:)[Sponsored Links]( … Read more

How to resolve SaxParserException in android

Issue I am using following code but getting saxparserexception. how to resolve it. when i am using following code it will give following exception. org.xml.sax.SAXParseException: unterminated entity ref (position:ENTITY_REF &@1:799 in how to resolve it please someone help me. *public class MapViewActivity extends MapActivity { MapView mapView; @Override protected void onCreate(Bundle savedInsatnceState) { super.onCreate(savedInsatnceState); … Read more

Starting an async task and make an action only when button clicked if result already available otherwise wait for result and then make action

Issue I have this code to make an asynchronous call in the background, show a progress bar and start another activity when a button is clicked : @Override protected void onCreate(Bundle savedInstanceState) { // …. actionButton.setOnClickListener(this); // call action here } @Override public void onClick(View v) { if (v.getId() { setProgressVisibility(VISIBLE); new MyActivity.ActionTask().execute(action); } … Read more

Simplest way to draw a route on mapview

Issue I want to show a route between the user’s current location and the location he entered in the searchview. Here is my code for the onQueryTextSubmit method @Override public boolean onQueryTextSubmit(String query) { // TODO Auto-generated method stub try { if(direction.isChecked() false) { gc new Geocoder(this); addresses gc.getFromLocationName(query,5); String add “”; if (addresses.size() > … Read more