Recently, I decided to update Android SDK.
just after update, I found that one of my projects is not starting anymore.
Debug reported the following errors:

05-16 19:36:02.118: E/AndroidRuntime(16193): java.lang.NoClassDefFoundError: net.sourceforge.zmanim.util.GeoLocation

05-16 19:42:37.173: E/dalvikvm(16313): Could not find class ‘net.sourceforge.zmanim.util.GeoLocation’, referenced from method com.kosherdev.toldot.DisplayData.getOuput

solution I found here NoClassDefFoundError – Eclipse and Android

I used to add additional libraries by adding External jar file in Build path.
Seems that some changes appeared in new ADT. You need just place your external jar file in libs directory and that’s it.

Be the first to comment
        

Following users’ requests, I added localization for Advanced Live timing.
Now you need to specify your language on Settings page and all data will be translated to selected language.
Currently added 9 languages:
English, Spanish, German, French, Italian, Russian, Polish, Swedish, Turkish.
Comment are translated also.

App is available on Android play

Be the first to comment
        

I played a little with SEO on Android Play and now Open Formula is the second after official app on search request “formula 1 live“. This is the most popular request, while searching for F1 Live timing app.

Be the first to comment
        

I was working on a project, where I need to detect location of the device. User needs to tap a button in configuration page and location should be detected.
Detection only by GPS didn’t work on some Samsung devices. Pretty annoying problem, I should say.
So, I added some other methods to get coarse location in case GPS is not accessible for some reason:

private class RetrieveLocation extends AsyncTask
    {
    	private ProgressDialog progress = null;
    	private double lat ;
    	private double lng ;
private LocationManager lm;
    private LocationListener locationListener;
    @Override
	protected Void doInBackground(Void... params) {
    			Looper.myLooper().prepare(); //This string makes magic. Without this string, there was an exception "Cant Create Handler Inside Thread That Has Not Called Looper Prepare in Android"
lm = (LocationManager)
	    	            getSystemService(Context.LOCATION_SERVICE);
	    	                locationListener = new MyLocationListener();
// Here starts fine location detection
    		        lm.requestLocationUpdates(
    		            LocationManager.GPS_PROVIDER,
    		            30000,
    		            30,
    		            locationListener);

    				   Location locationM = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);

    				if (locationM != null) {
    					 lat = Double.parseDouble(numberFormat.format(locationM.getLatitude()));
    					 lng = Double.parseDouble(numberFormat.format(locationM.getLongitude()));

    				}else{
// If fine location is not detected, we are trying to get network location

    					if (lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER))
    					{
    						progress.setMessage("Mobile network location");
    					lm.requestLocationUpdates(
    				            LocationManager.NETWORK_PROVIDER,
    				            30000,
    				            30,
    				            locationListener);

    						   locationM = lm.getLastKnownLocation(LocationManager.NETWORK_PROVIDER);
    						   if (locationM != null) {
    								 lat = Double.parseDouble(numberFormat.format(locationM.getLatitude()));
    								 lng = Double.parseDouble(numberFormat.format(locationM.getLongitude()));

    							}
    					}else{
// if we failed again, we try we get coarse location from passive providers
    						progress.setMessage("Coarse location");
    						lm.requestLocationUpdates(
    					            LocationManager.PASSIVE_PROVIDER,
    					            30000,
    					            30,
    					            locationListener);

    							   locationM = lm.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER);
    							   if (locationM != null) {
    									 lat = Double.parseDouble(numberFormat.format(locationM.getLatitude()));
    									 lng = Double.parseDouble(numberFormat.format(locationM.getLongitude()));    									    								}
    					}
    				}              

	return null;
	}
    @Override
	protected void onCancelled() {
    		super.onCancelled();
    }

    @Override
	protected void onPreExecute() {
	progress = ProgressDialog.show(
			SettingsPage.this, null, "Detecting location...");

	super.onPreExecute();
	}
    @Override
	protected void onPostExecute(Void result) {
    	 // After the search is finished, we can do something with the results lat and lng.
		progress.dismiss();

		super.onPostExecute(result);
		}
    @Override
    protected void onProgressUpdate(Void... values) {
    	super.onProgressUpdate(values);
    	}
    }

Don’t forget to add to Manifest.xml


	
Be the first to comment
        

android: Simple Calendar View

By Moishe Beshkin | Filed in Issues and resolutions

Following requests to share code with Calendar View implementation, I managed to compile two projects.

Simple calendar view with only Gregorian CalendarSimpleCalendar.zip
This implementation differs from this one in three main features:

  1. Implemented custom DateSlider from Codeus
  2. Progress indicator on Calendar view load
  3. dynamic week days display, instead of static image

Simple calendar view with Jewish Calendar and ZmanimSimpleJewishCalendar.zip
Adding to above mentioned features, there are some more for Jewish date:

  1. HebrewDates class and Java Zmanim by KosherJava.
  2. Jewish Holidays are marked with red
3 Comments so far. Join the Conversation
        

Switch to our mobile site