Wellcome and enjoy.

I would like to welcome you on my blog and thank for time you spend reading it I hope you will enjoy.It is personal creation of me, Lukas Tencer, and it will map my professional success as well as my personal interests.

Monday, January 25, 2010

Today`s Menu: Toast and Android

Hi and welcome to my third Android post. So long I am now on tutorial #6 from previously mentioned guide, and there are no slighter difficulties. One useful tweak I would like to talk about is class Toast in Android API.

Toast is used for displaying short messages for user. It`s main plus is, that it does not steal focus, so it is perfectly suitable to report about completed actions as: your message have been send, alarm have been set, option are saved etc.

It is defined as follows:
Toast.makeText(getApplicationContext(), "Saved!", Toast.LENGTH_SHORT).show().

First argument is just Context of current application, above which Toast should be displayed, second parameter is text of Toast itself and at last, there is parameter about duration. You could choose SHORT or LONG. Does not forgot about .show() parameter in the end, or else you will be lost as me and keep googling. Message itself has native look, so it is perfectly suitable for short messages. By now it is also for me only way to debug applications, because I am not so far by now. As soon I will come in touch with debuging, I will report as soon as possible.

Good bye for now and have some Toast. :-)

1, 2, 3 Sta... Problem

Hi and welcome to my second post about Android programming. So long, if you have followed video-tutorials from here, which I have recommended, you could face first issues with running your application right now.I have found some solutions on some problems, so let me please share this solutions with you.

In second part of video tutorial you are said to create new application and run it in android emulator. Creating application is the first problem. on screen "New Android Project" you could noticed, that there are here missing in field "Build Target" options to choose SDK version. This could be fixed bu running "SDK setup.exe" from android SDK directory and updating all required packages. There could jump out error message about unavailable connection, for me it jumped. Then under tab "Settings" check checkbox to use http instead of https. It helped me. After this restart Eclipse and create new application, now should be everything OK.

After creating application you should try to run it. I have other issue with Path Error and exactly application says "the project cannot be built until build path errors are resolved". This issue, in combination with Eclipse and is described also on android group here and it is known issue by android developers, not fixed yet. But easy solution is to menu item Project and choose Clean option. Now clean your new project. It could be run now.

Other difference between tutorials and reality is setting of emulator. On first run, you need to set up your emulator, this could be easily done by creating new instance of emulator, but be aware to choose right SDK version and proper devices. To decide which device to add look at specification of phone, which is you application intended to be run on. For me it is Google Nexus One, with specification available here.

So long about recent Android issues and I look forward for next post I could use to help you.

Sunday, January 24, 2010

Hamster Invasion, Not another B movie

Welcome to my second, first non-technical, post on my blog. This time I will share with you interesting random experience, what life brought me. Like caption whispers it will be all about hamsters today, a lot of hamsters.

One day, while visiting my girlfriend, we have been siting in her room and playing games. Unexpectedly loud noises come from hamster house, which was in her hamster cage. She was little bit afraid, because she have had pair of hamsters with female hamster little bit dominant and she used to beat male hamster. So she asked me to open their house and take her out from there. I opened house, pick the hamster and only the scream had followed. Two pink little beans were hanging from body of that tiny rodent. Another one bean had fallen down on floor and more one on first floor of cage. I don`t know, who was scared more, female hamster or girlfriend. Scream comes from one side, scared eyes of hamster from other one. I need to act quickly and fortunately I was able keep my mind calm. I have quickly put mother hamster with two babies into the house, opened cage, pick baby from first floor and put it into house, at least there was tiny problem with junior on the floor. It was so tiny, that you could almost pick it between last finger segments. Situation was successfully closed with female hamster with all four babies in house and male hamster already separated on another place.

So long about our scary birth, this situation had motivated me to little bit study about hamsters and what to do if they have child. So let me please share my knowledge now. What if my hamster gives birth to babies? [First of all search for red button with title DON`T PANIC. /joke /ref] First thing you need to do is separate male hamster from female hamster and babies. It is not required step, some of male hamsters help female feed and care about babies, but in most cases they would kill babies to copulate with female again. First rule, that you can read on every blog/fun-site is not to touch babies. But if something action-like happens to you as to me, do not hesitate and put babies into house.
In recent days after birth will be female especially nervous. I does not recommend you to touch her or open her house, she will be very angry and most likely will try to bite you. She will now more intensively than ever take care about her house or nest. I recommend you to give her a lot of stuff (pieces of toilet paper, non aromatic tissues, straw) to stuff her home. Also she need little bit change in diet. Because of the babies, she need a lot of proteins to her milk, best option is to give her mealworm, which you could buy in pet-store. Believe me, mealworms are dedicates for hamsters. Also some cheese or insects as gryllus or grasshopper will be OK. In first week babies will be blind and pink, in the end of first week also there should be sigh of fur on their skin. Also you will hear rising beeping from house. They are still blind. After second week they will start to open their eyes and female will spend less time with them. After three to four weeks they will start to come out from their house. At first mother will try to bring them back, but after few days she gives it up.
After four weeks you could separate babies from their mother. It is good to keep separated male and female babies, because they start sexually live very early, from one month to six weeks. You should avoid inbreeding, it is when close relative have babies. After separation from mother you can give them to your responsible friends, or other option is to sell them to pet-store, but you could not be sure it they would not and as snake`s lunch.

So much about hamsters and their babies. I would update my experience as they grow older.

Friday, January 22, 2010

Let`s go Android!

Just hear it (and say) about million times: "Today is the first day of my new life". No, I would not claim this today, I will rather change it a little bit, to sound like this: "Today is the first day of my new experience." Oh yes it`s an Android day.

As it is clear from this little intro in beginning, I have today begin my journey for new knowledge, knowledge about mobile application programing. Long time ago I was playing with idea to begin with programming on mobile platform, especially iPhone. But let`s ask ourself, who wont think about it? While watching this "one day millionaire" stories, and how people get rich just by developing simple application on iPhone.

But the problem was ... a lot of things. First of all (and at all) you need MacBook 1500 €, next you need iPhone 400 €, because motion control could not be tested on emulator, and last is SDK $100. Summed up it is about 2000 € and this if too much for just only try and idea. Also when I was speaking to people, who take this way, they were complaining about Apple and their policies. Long time before accepting application, problems with micro-transactions and demo applications a so much others. Honestly, now I don`t know, if Google and android has not similar problems, but at least, you can develop applications on windows and SDK is free.

Now let`s go to the point. How I have begin. At first, I have found nice collection of video tutorials here. I will follow them and write additional text to every one tutorial. At first, you need to download Java JDK, Android SDK and if you have some nice environment, then I recommend Eclipse, be sure to download Eclipse for Java Developers (not Java EE). I have also found some useful books about Android development, but about them and installation and preparations for first project we will talk later.