Back to project page SELP2013.
The source code is released under:
License ======= This work is licensed under the BSD 2-clause license as follows. # BSD 2-clause license Copyright (c) 2013, Sky Welch All rights reserved. Redistribution and use in source and ...
If you think the Android project SELP2013 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package uk.co.skywelch.selp2013; /*w w w . j a v a2s. c om*/ import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.Collections; import android.os.AsyncTask; import android.util.Log; public class VenuesParseTask extends AsyncTask<File, Integer, Boolean> { public static final String TAG = "VenuesParseTask"; public ArrayList<Venue> venues = null; @Override protected Boolean doInBackground(File... params) { try { FileInputStream in = new FileInputStream(params[0]); Log.d(TAG, "Parsing venues"); venues = new VenuesXmlParser().parse(in); Log.d(TAG, "Sorting venues"); Collections.sort(venues); Log.d(TAG, "Parsed and sorted " + Integer.toString(venues.size()) + " venues"); } catch (Exception e) { Log.e(TAG, "Failed to parse venues: " + e); e.printStackTrace(); return false; } return true; } }