Archive for the ‘Keine Kategorie’ Category

MIDlet-States für Anfänger

[german]Bei der recherche nach den MIDlet-States erstellte ich folgendes Programm. Vielleicht ist es für Andere ((Kommentare willkommen)) hilfreich. Außerdem fand ich folgende Dinge heraus:

  • Nokia 6300 (Symbian Series 40) kennt keinen pausierten Status für MIDlets
  • SonyEricsson K800i kann MIDlets pausieren (aus dem MIDlet und auch aus dem Telefon)
  • Wenn das K800i das MIDlet in den Hintergrund packt, werden weder pauseApp() noch startApp() aufgerufen – das Midlet läuft also vollständig im Hintergrund.
  • K800i kann nur dann wirklich pausieren, wenn man in der pauseApp() das currentDisplay auf null setzt (display.setCurrent(null);). Ein einfaches Aufrufen von notifyPaused() funktioniert nicht.
  • Suns Wireless Toolkit reagiert auf pauseApp() und notifyPaused() gleichermaßen.

[/german]
[english]While exploring the MIDlet-States i created the following program. Maybe it is useful ((Comments welcome *hint*)) for others. In writing the program the following peculiarities were found:

  • Nokia 6300 (Symbian Series 40) apparently does not know a paused-state
  • SonyEricsson K800i can pause MIDlets (either from the MIDlet itself or by the phone’s request)
  • If the telephone sets the midlet to paused state neither pauseApp() nor startApp() are called. Therefore the MIDlet runs the same way as if it was not paused.
  • K800i can only pause the MIDlet if you set the current display to null inside pauseApp() (display.setCurrent(null);). Simply calling notifyPaused won’t do the trick.
  • Suns Wireless Toolkit reacts to pauseApp() and notifyPaused().

[/english]

Read the rest of this entry »


Sie haben POST

Hurra!
Java Micro Edition an Ruby on Rails: wir haben Nachrichten!
und das ganze mit ein bisschen:

try {
	connection = (HttpConnection)Connector.open(url);
	connection.setRequestMethod("POST");
	connection.setRequestProperty("User-Agent", "Claudius im J2ME :D");

	String postdata = "message=ich+bin+toll&message[subject]=J2ME+Ruled!";
	byte[] body = postdata.getBytes();
	connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
	connection.setRequestProperty("Content-Length", Integer.toString(body.length));
	os = connection.openOutputStream();
	os.write(body);
} catch (Exception ex) {
	System.out.println(ex.toString());
	ex.printStackTrace();
} finally {
	if(os != null) {
		os.close();
	}
	if(is != null) {
		is.close();
	}
	if(connection != null) {
		connection.close();
	}
}

Weiter gehen. Hier gibt es nichts zu sehen.


Discovery Channel: I love the world


Datensicherung

Wir unterbrechen die übliche Sendung in diesem Blog für eine Sondermeldung: Bitte nehmen Sie sich nun ausreichend Zeit um eine Datensicherung vorzunehmen.

Read the rest of this entry »


Einmal warm halten, bitte (update)

Was derzeit in den Kinos läuft ist schon beinahe eine Zumutung. Nicht, weil die Filme schlecht wären – nur weil man im Moment außer Fortsetzungen kaum etwas zu sehen bekommt.
Read the rest of this entry »



Author

Claudius Coenen is a tech-enthusiast. He's writing on all kinds of topics, including programming, technology, gadgets and media.

This site features his occasional articles, findings, documentations.

Categories

Connect

RSS Recent Bookmarks

Legal