Friday, September 25, 2009

Fennec Alpha 3 for Windows Mobile



     Fennec Alpha 3 for Windows Mobile is out and ready for download. For those of you who don't know what Fennec is I will say only three words "Mozilla mobile browser". Yeah, it's true and it will be available for multiple platforms like it's bigger brother(Firefox). Among those platforms there is Windows Mobile, Maemo, Symbian.
     For those of you who tested the previous release I'll just cut to the news of this version:
  • Much improved panning/scrolling performance
  • Improved start-up time
  • Revised theme
  • Support for running in full screen
  • Numerous bug fixes
  • Improved painting performance
  • Improved UI polish
  • Support for touch sensitive directional pad on HTC devices
  • Improved kinetic panning with directional locking
  • Ability to scroll frames
  • Improved zooming support
  • Support for multiple screen sizes

     I know I'm a little late with the post but I know there's never too late. You can find here a link to the full article.
    With this said I'd like to thank again Brad Lassey, my mentor in GSoC 2009, for all the support on my project.
     Thumbs up for Mozilla!

King of Lines

     King of Lines is a game I worked on and now is ready to download on Android Market(and it's free). It's a simple logic game: you have to make rows of five or more balls of the same color in every direction.
     It has a little menu which lets you create a new game, save the game, load the game, and has even the undo option. Right now you can undo a maximum of three moves, but we may in further releases make a settings panel from which you can select how many moves should be memorized.
     Another feature this game has is the automatically save that is triggered every time the application is closed.
     In the menu you can also find highscore and network highscore options. The first is functional but the second is "in developing" state and will be available in further releases.
     In the next version there is a possibility to let you chose the table size and the line size.

We are open to suggestions!




= Inatech team, simplegames.mobi project =

King of Lines

Thursday, September 24, 2009

Orientation change trick

     Today I was in need of stopping my application from resetting after the orientation change. What happens when the orientation change?
     Well, first of all the orientation change is managed by the default activity handler. And the default handling for this event is to restart an activity.
     What you need to do to stop the activity to be default handled is:

        1. Go to the manifest XML file and in the activity tag add the following attribute:

        android:configChanges="orientation"

        Now if you'll run the application an rotate the screen you will get the "java.lang.OutOfMemoryError: bitmap size exceeds VM budget" exception because the system runs out of memory since it still creates a new activity but the previous is not destroyed. So the solution is not solved yet.
 
       2. For the custom orientation change handling to actually take place you need also to override onConfigurationChanged method.

       @Override
       public void onConfigurationChanged(Configuration newConfig) {
               super.onConfigurationChanged(newConfig);
       } 



     Right now the problem is solved and you can change the orientation as many times as you like without the activity to get restarted.
     If you still get the "java.lang.OutOfMemoryError: bitmap size exceeds VM budget" exception it means that you have a little memory leak. You can find some advices on how to solve memory leaks problems here.
     If you get to try this solution you may want to take a look on the documentation and find out which other  config changes  you may manage manually.

Saturday, September 12, 2009

ERROR Error parsing XML file: Unbound prefix

In my last days I've been playing around with Android SDK making a little game. Found out the SDK is very poor in documentation and even some examples have errors.
I ran into the "Unbound prefix" error while trying to make a frame by frame animation. The example showed something like this:

 <?xml version="1.0" encoding="UTF-8"?>
 <animation-list   android:id="selected"  android:oneshot="false">
     <item android:drawable="@drawable/ballmove" android:duration="150"/>
     <item android:drawable="@drawable/ballmove2" android:duration="150"/>    
     <item android:drawable="@drawable/ballmove3" android:duration="150"/> 
</animation-list>  

but if you tryed it yourself you surely found out it isn't working.

The way to solve this stupid error is to add
xmlns:android="http://schemas.android.com/apk/res/android"
as the first attribute for the animation-list tag.