Code example for Scanner

Methods: close, next, nextDouble, useDelimiter

0
	 
	@Override 
	protected LatLng doInBackground(String... urls) {
		Double lat=0.0,lng=0.0;
		try { 
			Scanner input=new Scanner(FileBank.openStream(urls[0]));
			input.useDelimiter(",");
			//unix time 
			input.next();
			//lng then lat (backwards) 
			lng=input.nextDouble();
			lat=input.nextDouble();
			input.close();
			return new LatLng(lat, lng);
		} catch (Exception ex) {
			Log.e("LOCATION",ex.toString(),ex);
			FileBank.invalidate(urls[0]);
			return null; 
		} 
	}//end doInBackground