2. März 2010
S40
When you connect you mobile phone to your PC via USB, you can open a serial connection to the device with a terminal application (Putty for Windows, ZTerm for MacOS) and see the log messages. This method is discussed in the Nokia forum.
S60
The S60 platform offers advanced debugging solutions. The S60 SDK provides a midlet that you have to start before you application and forwards all interesting informations like log messages, cpu and memory consumption to a application on your PC. The mobile phone can be connected via USB, Bluetooth or WLAN. This method is described in the Nokia forum.
Android
The Android SDK offers a mighty debugging solution with the Android Debugging Bridge (ADB). See the documentation.
Tweet This Post
Veröffentlicht in Allgemein | Keine Kommentare »
18. Februar 2010
Wir verlosen unter unseren Fans auf Facebook bzw. unseren Followern auf Twitter jeweils 25 Freitickets für die CeBIT 2010. Die Gewinner werden am Freitag, den 26. Februar gezogen.
Dieses Jahr sind wir auf der CeBIT im Microsoft Partnerbereich in der Halle 4 vertreten.
Tweet This Post
Veröffentlicht in Allgemein | Keine Kommentare »
20. Januar 2010
Veröffentlicht in Allgemein | Keine Kommentare »
20. Januar 2010
Veröffentlicht in Allgemein | Keine Kommentare »
19. Januar 2010
Veröffentlicht in Allgemein | 1 Kommentar »
18. Januar 2010
If you want to create applications for the IPhone but don’t want to go into the troubles with the ITunes Store or you are too lazy to learn Objective-C, there is another possibility: create a web application with a native IPhone Look and Feel.
For this purpose there exist some frameworks:
These frameworks fake the Look and Feel of an IPhone application by using CSS and JavaScript. The developer creates normal HTML lists and includes the framework, which does all the hard work. Following there are two pictures that show a music application developed with the frameworks iui (on the left) and iWebKit (on the right).

To hide the status bar of the Safari browser, add the following code to the HTML header:
<meta name="viewport" content="width=device-width; initial-scale=1.0;
maximum-scale=1.0; user-scalable=0;"/>
<meta name="apple-touch-fullscreen" content="YES"/>
The web application can be placed on the IPhone start screen like a native app. The title of the HTML file is used as application name. The icon of the application can be set with the following code:
<link rel="apple-touch-icon" href="icon.png"/>
If you want to upload your web application to the ITunes Store, you should look at the following frameworks:
They allow the conversion of HTML pages into native IPhone apps.
Tweet This Post
Veröffentlicht in Allgemein | 5 Kommentare »
14. Januar 2010
We’re just finishing our new BlueID Client for Android devices. During the development I realized, that we need to rezip the BlueID software for Android because it must be personalized on the fly on download request. This is needed for security!
I found no tutorial explaining this content and it was a little bit tricky. If you like to make changes to an Android Package (file ending apk) internally in Java you need to do more than only unzip and zip again. I first tried to solve this by using the apkbuilder form the android-sdk tools, but it only works with file operations. I think I found a better solution.
First you need to include some libraries from the android-sdk tools lib folder into your project.
- apkbuilder.jar
- androidprefs.jar
- jarutils.jar
Then you need to make your changes to your package with the standard ZipStreams from Java. After this, use the following method for rezip or sign the package correctly for Android phones.
public byte[] packApk(byte[] zip) throws Exception {
DebugKeyProvider keyProvider = new DebugKeyProvider(null, null, null);
PrivateKey key = keyProvider.getDebugKey();
X509Certificate certificate = (X509Certificate) keyProvider.getCertificate();
ByteArrayOutputStream bout = new ByteArrayOutputStream();
SignedJarBuilder builder = new SignedJarBuilder(bout, key, certificate);
builder.writeZip(new ByteArrayInputStream(zip), null);
builder.close();
return bout.toByteArray();
}
I hope this code will help you!
Regards, Julia Bory
Tweet This Post
Schlagworte: Android, APK, apkbuilder, blueid, com.android.apkbuilder.ApkBuilder, HTC Hero, Java, Motorola Milestone, packen, Phone, rezip, security, Sicherheit, sign, signieren, signing, signjarbuilder, unzip, zip
Veröffentlicht in Allgemein | Keine Kommentare »
14. Januar 2010
Dieser Artikel erläutert, wie man das Spring Framework zusammen mit dem JAX-RS-Provider Jersey einsetzen kann. Das Ziel soll sein, dass die Rest-Resourcen automatisch instantitiert werden und die benötigten Abhängigkeiten über Spring injiziert werden.
Dazu muss zuerst in der web.xml das Spring-Framework durch die Angabe zweier Listener und durch Festlegung der Spring-Konfigurationsdatei initialisiert werden. Außerdem muss ein spezielles SpringServlet eingebunden werden, dass die Rest-Anfragen an Jersey weiterleitet. Dieses Servlet liefert Jersey im Paket jersey-spring mit.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.web.context.request.RequestContextListener
</listener-class>
</listener>
<servlet>
<servlet-name>Jersey Spring Web Application</servlet-name>
<servlet-class>
com.sun.jersey.spi.spring.container.servlet.SpringServlet
</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Jersey Spring Web Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
In der Spring-Konfigurationsdatei ist nur ein Eintrag nötig. Mittels Component-Scan werden alle Rest-Resourcen gefunden, die mit der Annotation @Component markiert sind. Danach werden alle Beans definiert, die in die Rest-Resourcen-Klassen injiziert werden sollen (im Beispiel: testObject).
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-2.5.xsd">
<context:component-scan base-package="de.baimos.blueid.test"/>
<bean id="testObject" class="de.baimos.blueid.test.TestObject"/>
</beans>
Nachfolgend wir eine Rest-Resourcen-Klasse erstellt. Wie bereits erwähnt, muss diese mit der Annotation @Component ausgezeichnet werden, um vom Spring-Framework gefunden zu werden. Damit nicht bei jeder Anfrage ein neues Objekt erzeugt wird, wird der Scope auf Singleton gesetzt. Mit Hilfe der Annotation Path wird festgelegt unter welchen Pfad die Resource zu erreichen ist.
Schließlich wird eine Instanz von TestObject über die Annotation @Resource angefragt, die dann von Spring automatisch injiziert wird.
@Component
@Path("hello")
@Scope("singleton")
public class HelloWorld {
@Resource
private TestObject testObject;
@GET
public String sayHello( @QueryParam("name")String name){
return testObject.sayHello(name);
}
}
Tweet This Post
Veröffentlicht in Allgemein | Keine Kommentare »
14. Januar 2010
Are you sick of creating maps with all the redundant syntax like in the example below?
Map<Integer, String> map = new HashMap<Integer, String>();
map.put(1, "ONE");
map.put(2, "TWO");
map.put(3, "THREE");
With the usage of some advanced Java 5 features, we can make map creation simpler:
Map(
o(1, "ONE"),
o(2, "TWO"),
o(3, "THREE"),
);
Too make this happen you need the class that is listed below. Just import the methods Map and o statically and then lets rock!
public class FluentMap {
public static <K, V> Map<K, V> Map(Tuple<K, V>... entries) {
Map<K, V> map = new HashMap<K, V>();
for (Tuple<K, V> entry : entries) {
map.put(entry.t1, entry.t2);
}
return map;
}
public static <T1, T2> Tuple<T1, T2> o(T1 o1, T2 o2) {
return new Tuple<T1, T2>(o1, o2);
}
public static class Tuple<T1, T2> {
private T1 t1;
private T2 t2;
public Tuple(T1 t1, T2 t2) {
this.t1 = t1;
this.t2 = t2;
}
}
}
The trick here is that Java supports type inference in static methods. That is why you don’t need to specify any type.
Tweet This Post
Veröffentlicht in Allgemein | 8 Kommentare »
14. Januar 2010
Um die Komplikationen mit dem ITunes Store zu umgehen oder um sich die Einarbeitung in Objective-C zu sparen, empfiehlt es sich, eine Webapplikation mit IPhone Look and Feel zu entwickeln.
Für diesen Zweck gibt es bereits einige Frameworks. Dazu gehören:
Diese Frameworks bilden durch geschickten Einsatz von CSS und JavaScript eine native IPhone-Applikation nach. Die nachfolgenden zwei Bilder zeigen eine Musikapplikation die mit den Frameworks iui (links) und iWebKit (rechts) entwickelt wurde.

Um die Statusleisten des Browsers verschwinden zu lassen ist folgender Code im Header der HTML-Datei zu platzieren:
<meta name="viewport" content="width=device-width; initial-scale=1.0;
maximum-scale=1.0; user-scalable=0;"/>
<meta name="apple-touch-fullscreen" content="YES"/>
Die Webapplikation lässt sich, wie eine native Anwendung auch, auf den Startscreen des IPhones ziehen. Als Applikationsname wird der in der HTML-Datei festgelegt Titel verwendet. Das Icon kann man durch folgenden Code im Header setzen.
<link rel="apple-touch-icon" href="icon.png"/>
Wer seine Webapplikationen in den ITunes Store hochladen will, sollte sich folgende Frameworks ansehen.
Diese erlauben nämlich die Umwandlung von HTML-Seiten in native IPhone-Applikationen.
Tweet This Post
Veröffentlicht in Allgemein | Keine Kommentare »