[Solved] Why can’t able to use if/else in AsyncTask? [closed]
The if is not in any method. It’s just lose at the class level. Put it inside the do in background or better yet its own method: private String getUrl(Double lat, Double long) { if(lat != null && lng!= null) { String URL = “http://xyz.in/api/stores/around_me.json?app_id=test&lat=” + lat + “&lng=” + lng; return URL; } else … Read more