Articles Tagged ‘service’

Using the Android Daydream API

Tuesday, January 22nd, 2013

Daydream is the new interactive screensaver mode that was added in the Android 4.2 / Jelly Beans release. Such “dreams” may be activated when the device is in idle mode or inserted into a dock.

In the following tutorial we’re going to create a simple daydream that starts a simple animation and in addition we’ll be adding a configuration screen to alter the behaviour of this daydream.

(more…)

Task Scheduling in Java EE 6 on GlassFish using the Timer Service

Friday, June 22nd, 2012

Creating cronjobs or scheduled service executions is made really easy in Java EE 6. Scheduled tasks may be created in a programmatical style or simply by adding some annotations to an EJB.

In the following tutorial we’re creating some simple scheduled tasks and let them run on an embedded GlassFish instance using the Maven Embedded GlassFish plugin..

(more…)

Wiring made easy using OSGi Blueprint and Apache Karaf

Monday, April 16th, 2012

The OSGi Blueprint Container specification allows us to use dependency injection in our OSGi environment, declarative import and export of OSGi services, registering lifecycle listeners and wiring dependencies into our services with a few lines of XML code.
In the following tutorial we’re first building an OSGi bundle classical style and afterwards take a trip into the advantages of the Blueprint specification.

Our OSGi container of choice here will be Apache Karaf a lightweight container with a lot of nice features and – of course – blueprint enabled…

(more…)

Managing Background Tasks on Android using the Alarm Manager

Sunday, November 27th, 2011

In today’s tutorial we’re going to take a look on how to handle periodically scheduled tasks on our Android device by using BroadcastReceivers, Services and the AlarmManager.

(more…)

Android Widget Tutorial: Creating a screen-lock Widget in a few steps

Thursday, October 6th, 2011

hasCode Android Widget Tutorial Logo In today’s Android tutorial we’re going to take a look at Android’s Widget API and how to make a widget interact with a service using intents.

We’re going to create a fully functional application that allows us to enable or disable our smartphone’s screen lock settings using a widget that can be placed on our  home screen.

Finally I am going to show how to use a smartphone to test and debug our application and connect it to the IDE.

(more…)

REST-assured vs Jersey-Test-Framework: Testing your RESTful Web-Services

Monday, September 5th, 2011

Today we’re going to take a look at two specific frameworks that enables you to efficiently test your REST-ful services: On the one side there is the framework REST-assured that offers a nice DSL-like syntax to create well readable tests – on the other side there is the Jersey-Test-Framework that offers a nice execution environment and is built upon the JAX-RS reference implementation, Jersey.

In the following tutorial we’re going to create a simple REST service first and then implement integration tests for this service using both frameworks.

The title of this article might be misleading due to the fact that I am not going to compare both frameworks to choose a winner, just showing the different approach ..

(more…)

Search
Categories