29
05
2010
Mostly every application needs some kind of "about" dialog. The about dialog shows basic informations about the application, its author and most likely some copyright information, the version information and so on.
For most of the Android developers out there, this might be an obvious task. I for myself want to use this example to help some beginners to show how this can be done. Since building a "static" about dialog is quite easy, I would like to extends this example to properly load the correct version information using the PackageManager.
Continue reading "Creating a simple "About" Dialog in Android (>=1.6)"
Written by Sebastian Bauer
Comments :
No comments »
Categories : Android
Trackbacks :
No Trackbacks »
28
05
2010
Ok, not that I'm a blogger star. The last few months I really had not much time to work on this blog, since I was still working on many other things. Now there's more time and I'll see if I can keep this blog living.
Before I start with new articles soon (I'm moving next week), I'll give you an interesting link, to find out which programmer personality you are. Have a look at
Doolwind's Game Coding Blog (which is - just to mention it - a very good and interesting blog!) and fill out the test. Post your results here!
Here's my result:
Your programmer personality type is:
DHTB
You’re a Doer.
You are very quick at getting tasks done. You believe the outcome is the most
important part of a task and the faster you can reach that outcome the better.
After all, time is money.
You like coding at a High level.
The world is made up of objects and components, you should create your programs
in the same way.
You work best in a Team.
A good group is better than the sum of it’s parts. The only thing better than a
genius programmer is a cohesive group of genius programmers.
You are a liBeral programmer.
Programming is a complex task and you should use white space and comments as
freely as possible to help simplify the task. We’re not writing on paper anymore
so we can take up as much room as we need.
See you soon!
Written by Sebastian Bauer
Comments :
No comments »
Categories : Projects
Trackbacks :
No Trackbacks »
22
02
2010
phphatesme.com, the largest and BEST PHP blog in Germany celebrates it's 500th birthday

And no, these are no 500 years, it's the 500th article! We wish Nils the absolutely best and are looking forward to the next 500 articles!
Nils, thank you very much for this great blog!
Written by Sebastian Bauer
Comments :
No comments »
Categories : PHP
Trackbacks :
No Trackbacks »
09
01
2010
It's been some time since our last posting on this blog. I don't have to tell you why.. the same procedure as every year: I have been busy as hell. It's not getting much better, but there's no need to. Wonder why? Because we have a co-author now supporting me in writing for this blog!
Welcome
Martin to our blog! You've already seen his first article yesterday and I hope there are a lot more to come.
You are maybe wondering what has happened in the mean time? Well,
mooter - my twitter client - is in a good process and I'm hoping to release a first public version soon. We already have a good testing team of some people and I am really looking forward to release the first public version.
Furthermore I bough a Motorola Milestone in the meantime (also known as "Droid") and will now digg into Android development, soon. This will become another topic on this blog and I hope I can deliver you with some goodies about android.
Now that's it for the moment, hope the "down time" in the last months did not smaller your interest in our articles! Just an additional info: Martin also has a twitter account, so let's follow
him!
Written by Sebastian Bauer
Comments :
No comments »
Categories : Projects
Trackbacks :
No Trackbacks »
08
01
2010
Today I had a problem importing a CSV file in PHP. It seems that apache doesn't properly regognize the line endings from the csv file.
When CSV the file has been created on a Mac, you will get problems when using fgetcsv to parse CSV files under PHP: The line endings are incorrectly interpreted.
Try the following code:
'auto_detect_line_endings' enables PHP to interoperate with Macintosh systems and look after which line-ending conventions is used.
The common line endings are:
\n (UNIX/Linux)
\n\r (Windows)
\r (Mac)
Here is an wikipedia article about the historical reason behind different line ending at different platforms:
Newline History
Written by Martin Mohr
Comments :
3 Comments »
Categories : PHP
Trackbacks :
No Trackbacks »
07
11
2009
Hey folks, I know, it's been some time since my last posting, but I am currently very busy as you might imagine. But I'll soon post some progress reports, especially for my AIR based Twitter client "mooter" which is really on a good way.
Anyways, this posting should more be a reminder: beginning upcoming weekend the International PHP Conference 2009 and WebTech Conference start in parallel in Karlsruhe. I'll be speaking there for one session about possibilities and impossibilities of Adobe AIR for AJAX developers and some lessons learned during my first big project for an AJAX based AIR application.
The session will take place on tuesday morning (17.11.2009) at 9am. I'm really looking forward of eventually meeting one or two of you personally.
Written by Sebastian Bauer
Comments :
No comments »
Trackbacks :
No Trackbacks »
01
10
2009
After a short quiet period I'm back today to tell you something about the AIR file object. While deploying a new version of my application I ran into some problems on other systems. AIR threw the error
#2037: "Functions called in incorrect sequence, or earlier"
Not really self-speaking, huh? Doing some debugging, I found out that the error was thrown at last line of the following code:
The problem is, that the File and the FileReference classes need to be initialized with a file path, otherwise every attempt to access a property will fail. Thanks to
Mike Chambers who talked about this issue earlier. His blog post really helped me a lot. I fixed this issue by changing my code to the following:
This initializes the File object with the path of the application directory, which should be fine for all cases.
What is also interesting about this topic: the error only occured on a Mac OS X system, not on my Windows machine. Have not yet been able to test this under Linux.
//Update: I still encountered some problems using this mechanism. For some reason zfile contains no valid resource on Mac OS X. Just FYI
Written by Sebastian Bauer
Comments :
No comments »
Categories : Adobe® AIR™
Trackbacks :
No Trackbacks »
10
09
2009
Since CSS2 many browser began supporting the @font-face CSS selector for embedding downloadable fonts.
WebKit already supports this feature for more than 2 years. Today I tried to embed a custom font in my AIR application with negative results. In my HTML based application the font cannot be loaded or applied to the contents. For now I cannot find any information about this on the Adobe developer centers, neither I can find anything on Google. I found out that embedding custom fonts is allowed in Flex but for any reason, in HTML it is not.
Here's my CSS I used:
Any ideas are appreciated. I'll see if I can find out something further.
Written by Sebastian Bauer
Comments :
4 Comments »
Categories : Adobe® AIR™
Trackbacks :
No Trackbacks »
07
09
2009
Today I was asked how to automatically create multiple non-empty dummy files under linux with just one command. Here is a small bash script. To adjust the number of files to be created, adjust the "10" in "$(seq 0 10)" to a number of your choice. To adjust the file size to be created, change "count=2" to anything you like. The "bs" parameter defines the base for the count parameter. bs=1024 means that 1024 bytes * "count" is the file size. In this case it's 2kilobyte. To have 1MB files you could either write "bs=1024 count=1024" or "bs=$((1024*1024)) count=2" or "bs=1024 count=$((1024*1))".
PS: there seems to be a problem with the bash highlighter of dp.SyntaxHighlighter: on line 4 the first "if" after dd is one if too much. The line should be "dd if=/dev/zero of=file${i} bs=1024 count=2 2>&1;"
Written by Sebastian Bauer
Comments :
2 Comments »
Categories : Linux
Trackbacks :
No Trackbacks »
02
09
2009

Today I'll give a first peek on my current project. Is it.. is.. uhm.. is it
really a twitter client? Yeah, it is. Despite the fact that there are dozens of twitter clients out there I really wanted to make my own one. That's not because I think I can do it better (Twhirl is great!) but I wasn't able to find a good and free client for my Mac.
TweetDeck is too big in my opinion. Twitter is just a short messaging service, microblogging. So I expect the client to be as micro as the purpose of the service. Don't get me wrong, TweetDeck is great but just too big for me. Then we have Twhirl which is absolutely great and which is my default client on every system. BUT: running on my Mac (iBook G4) with two accounts active my fans immidiately start to blow. mooter (name to be defined

) should be a lightweight client for multiple accounts. A final design on how to manage seperate accounts is not yet ready. But I'm thinking of an intuitive way of combining the timelines of multiple accounts in one.
So these were the main reasons on why I started developing yet another twitter client. One reason though is: I just wanted to do something with the twitter API and see how it works. Additonally this is also an interesting approach for me on developing nice and interactive AIR desktop applications.
So, here's a first shot of my current version, showing the timeline and a notification bubble. Not much yet but tweeting and displaying the default timeline already works fine

Even with automatic linking of hashtags, usernames and URLs.
And so here's my question: what do you really expect from a sleek and lightweight twitter client? Share your thoughts!
Written by Sebastian Bauer
Comments :
No comments »
Categories : Projects
Trackbacks :
No Trackbacks »
30
08
2009
While developing an AIR application which uses an online API with HTTP Basic Authentication I experienced issues with AIR's authentication dialog.
For doing the authentication I generated a HTTP authentication header including the login credentials. I appended this header to my XMLHttpRequest. In case the login credentials were correct, everything was fine and the request could be completed successfully. But if the credentials were wrong, AIR showed up with a login window to enter the login data for the given domain. Since most AIR applications will be a fully integrated user experience, I'm sure this would be a drawback for most developers. Another interesting point is, that the login box showed up even before I got notified about an 401-HTTP status response.
Continue reading "Disable AIR's login dialog when using XMLHR with HTTP basic authentication"
Written by Sebastian Bauer
Comments :
4 Comments »
Categories : Adobe® AIR™
Trackbacks :
No Trackbacks »
27
08
2009
While doing some security tests to an AIR application I'm currently developing, I stumbled over a strange behaviour. In the
AIR documentation, Adobe says:
Each AIR application is signed, and an installed application cannot run if any files in the installed application directory do not match the application’s signature.
That - at least I thought so - means: if any of the installed files of an application gets modified or removed, the AIR framework will prevent the application from being run. But it doesn't. I modified some JS file of my application, added some alerts and the application just executes fine and also displays those "illegal" alerts. Removing some installation files doesn't seem to make AIR care about, too. Even if I remove the signatures.xml file from the application's META-INF directory, which holds all file signatures, AIR just feels fine and executes my application without any note.
Now I am wondering why modifications to the installation files have no effect on what AIR does with the application. Does this validation only work on "proper" certified files and validation will be skipped if the application if signed with a self-signed certificate? Hope anyone has an idea about this? I'll try to contact Adobe to get some information about this topic.
Written by Sebastian Bauer
Comments :
No comments »
Categories : Adobe® AIR™
Trackbacks :
No Trackbacks »
24
08
2009
Finally, I'm back from vacation. Way too early.. However I'll try to post some new articles within the next days. But first of all I would like to announce my participation as speaker to this year's
WebTech Conference in Karlsruhe. You'll find some information about my session
here.
In short my session will be a demonstration of building a complex and innovative application in AIR using AJAX technology. Since I think most of the AIR knowledge around is about using AIR with Flex and Flash, this session is to show that it is possible to build complex applications in AJAX/HTML, too. I'll focus on a project I am leading at my employer which nicely shows what is possible and where the AIR/AJAX combination gets to its limits.
Written by Sebastian Bauer
Comments :
No comments »
Trackbacks :
No Trackbacks »
08
08
2009
By the end of this year my mobile contract expires and so I went on a journey for looking at what will be my next mobile phone. I currently have several candidates in pipe but let's talk about that later. My current favorite is a phone based on Android. I really like the features of the OS and it offers exactly what I am looking for: an open API for developing and playing around.
So I took a look at the Android SDK and got surprised that it is not supported to buil Android apps on a Power PC mac!? Too bad, since it would be pretty cool to use my iBook on vacation and more to develop android apps. But ok, so I have to be pleased with the linux version and hope that Google will think about this. However I think that support for PPC mac will never come, since all new Macs are Intel based.
Written by Sebastian Bauer
Comments :
No comments »
Categories : Android
Trackbacks :
No Trackbacks »
07
08
2009
So here it is, my first real post on my new blog. Hope you enjoy!
Adobe® AIR™ offers a lot of great features. However, developers, building AJAX-only applications using HTML and JS often may suffer from the lack of documentation. The AIR API reference for JavaScript developers is mostly complete in term of AJAX developing AIR apps but also lacks some common features.
This is an issue which may point to the fact that most AIR applications will be developed using Flex/ActionsScript. Since I develop a large application in JavaScript and HTML I had to solve some issues and more so I'll share this knowledge with you
My first posting leads me to a simple but useful snippet which allows you to read application information stored in AIR's application descriptor. For example if you need to reference the version of your application somewhere in your code, you can use my construct.
Continue reading "Reading Application Information in HTML based AIR Applications"
Written by Sebastian Bauer
Comment :
1 Comment »
Categories : Adobe® AIR™
Trackbacks :
No Trackbacks »