Manually firing Quartz scheduler jobs

Exactly what the title says, this snippet will fire all job for all schedulers registered. // Get our scheduler factory StdSchedulerFactory schedulerFactory = new StdSchedulerFactory(); Collection<Scheduler> schedulers=schedulerFactory.getAllSchedulers(); for(Scheduler scheduler:schedulers){ System.out.println("scheduler "+scheduler.getSchedulerName()); String[] groups=scheduler.getJobGroupNames(); for(String jobGroup:groups){ System.out.println(" ** GROUP="+jobGroup); String[] jobNames=scheduler.getJobNames(jobGroup); for(String jobName:jobNames){ System.out.println(" ** jobName="+jobName); //Fire actuall job scheduler.triggerJob(jobName, jobGroup); } } }// Get our …

Manually firing Quartz scheduler jobs Read More »

Specifying java source and target version in Maven 2

While converting from Ant to Maven2 i have came across following error while trying to compile the project generics are not supported in -source 1.4 (try -source 1.5 to enable generics) private Map variables; To fix the problem we need to add the pluggin configuration to our pom.xml <project> … <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> …

Specifying java source and target version in Maven 2 Read More »

Detecting Network Speed and Type on Android (Edge,3G)

For better experience for users of my app I wanted to show them different UI based on their network speed, problem here is that there is no way to know what network we are currently on. My first instinct was to use android.net.ConnectivityManager getActiveNetworkInfo() which gives us current network information, but the only thing we …

Detecting Network Speed and Type on Android (Edge,3G) Read More »

Custom Android Tabs

Due to limitation of Android Tab component I created a custom TabWidget that I am using in couple different projects already. The widget allows us to  add custom background and use custom icons, tabs   can be Top/Bottom aligned. Currently tabs can launch new Activity and  Dialog , when starting new Activity we can use  “startActivityForResult” …

Custom Android Tabs Read More »