Author Archives: hypernextandroid

About hypernextandroid

TigaByte Software

HAC v1.14 with UDP Messaging

HAC v1.14 released for Windows (25th May 2012 )

This update adds UDP messaging plus improvements and bug fixes.

UDP messaging is an easy to use communications protocol that is ideal for messaging between apps in local networks such as in schools and businesses. It allows fast communications and can also interact with hardware that supports the UDP protocol.

For further details see the release notes accompanying HAC and the posts listed in our forums

Thank you to our forum users and others for submitting such valuable feedback.


6 How To: Develop for the Kindle Fire

What is the Kindle Fire
Amazon’s Kindle Fire is a tablet computer version of their Kindle eBook reader. It runs a modified version of Google’s Android operating system so allowing users to run and source apps originally intended for Android devices.

This article takes a brief look at using HAC(HyperNext Android Creator) to develop apps for the Kindle Fire. Before that though we mention the two traditional approaches to developing for the Kindle Fire. However, if you don’t know or don’t want to use Java then just skip this next section and go to:- HAC and Kindle development.

Kindle and Android SDKs
Amazon provides a free Kindle SDK(Software Development Kit) so developers with a good knowledge of Java and the Android APIs can create their own apps. The Kindle Fire runs a modified version of Android Gingerbread and therefore has some differences from the official Google Android Gingerbread.

It is possible to use Google’s Android SDK to develop apps for the Kindle Fire but there is some Kindle functionality that the Android SDK cannot provide.  In contrast the Kindle SDK gives the developer full access to all the Kindle Fire’s functionality such as showing and hiding the Options Bar whereas the Android SDK cannot access these Kindle specific features.

The advantage of using only the Android SDK approach is that your app can potentially run on both standard Android devices such as Xoom etc as well as the Kindle Fire and you do not have to try to keep projects synchronised with the Kindle SDK. The disadvantage is that it can be awkward to get your app to look right on the screen because the Options Bar can hide the lower part of it:-

HAC and Kindle Development
Developing for the Kindle Fire with HAC(HyperNext Android Creator) is much the same as using HAC to develop for a standard Android device with just a couple of things to look out for. Note, that HAC apps know when they are running on a Kindle Fire and automatically take care of optimising the screen coverage so users don’t have content hidden by the Options Bar. HAC developers can also add a device check inside their app to see which type of Android device it is running on and so take appropriate actions.

1) Screen Sizes
The Kindle Fire screen size is 1024 x 600 pixels with 20 pixels taken by the top Status bar and 40 pixels taken by bottom Options bar. HAC built apps automatically detect screen dimensions and handle the screen drawing so the app creator just has to choose the appropriate screen settings as described below.

HAC offers 3 options for allowable screen orientation;- either portrait or landscape, portrait only, landscape only.

During the development of your app HAC offers 3 screen scaling options: none, fit or stretch. The option none is only really useful when targeting a specific device where both orientation and screen size are known in advance. The fit option keeps the ratio of the apps height to width ratio constant irrespective of which physical device it is running on or whether the screen orientation is changed. This ratio is determined from the size given to the home card. The stretch option simply stretches the app’s screen area to fully cover the usable screen area but can result in large distortion if both portrait and landscape orientations are allowed.

To setup the screen orientation and scaling, open HAC’s Your Application window via the Android menu and it should look similar to Fig 1 below:-

Setting orientations and screen scaling

Fig 1 –  HAC’s Your Application window showing app screen setup

2) Carousel Icons
Most Android smart phones and tablets have used a 2D array of icons to represent their installed apps but the Kindle Fire also has a  stylish carousel to display them in. The carousel displays the most recent apps, books etc and represents an app by displaying its attached icon . If it can’t find the correct icon it will use an app’s launcher icon although this can result in apps with low resolution  icons looking very shabby and dated.

Fig 2 below shows the carousel on a Kindle Fire although unfortunately the camera could not accurately capture the true color of the app icons.  Three of the apps are made by HAC with one having a 200 x 200 icon and the others using older 48 x 48 icons.

From left to right the apps on the carousel are:-

1 – Kindle Test with 200 x 200 icon

2 – Lunar Lander with 48 x 48 icon

3, 4, 5 – standard high res Kindle icons

6 – PreSchool Sums with 48 x 48 icon

Note that as they are PNGs their transparency works

Fig 2 – Kindle Fire carousel

HAC supports icons up to 800 x 800 pixels so allowing an app to look stylish in the Kindle Fire’s carousel. If the icon is in PNG format then transparency is supported. Note that these icons will still work on older Android devices such as the G1 smartphone because the Android system does its own scaling.

To add an icon to your app, open HAC’s Your Application window using the Android menu and assign the icon to the area highlighted by red as shown in Fig 3  below. Either drop your icon onto the icon area or else navigate to it using the Launcher button:-

Setting icon for your app

Fig 3 – HAC’s Your Application window showing launcher icon area

When designing for the Kindle Fire, just treat it as another Android Device but remember to create a higher resolution icon for it otherwise your app can look shabby and dated sitting on the carousel. Also think about which screen orientation(s) your app needs. Note, although this article has covered the Kindle Fire, the above points about screen sizes, orientations and launcher icons are still relevant to creating apps for other Android devices.

Members of HAC forums can download the latest trial version of HAC, see details here:-


HAC v1.13 with Kindle Fire update

HAC v1.13 released for Windows (17th Mar 2012 )

This update brings many improvements to HAC and HAC created apps running on both standard Android devices and Amazon’s Kindle Fire.

The Persistant Storage option now works. This allows an app upon quitting to automatically save all its variables/fields so that on restarting they can be automatically reloaded thus saving the programmer a lot of work.

There are some major improvements including fixing screen orientation, better detection of status bar height plus several bug fixes.

Extra functionality include 4 new functions for fast array searching and 30 commands/functions for operating on Binary files.

Improvements directed at the Kindle fire include better use of its screen area and the ability to use up to 800×800 icons for the carousel. Also apps are now fully refreshed after being sent to the background such as might happen when the user activated another app or pressed the Home or Back buttons on the Options Bar.

For further details see the release notes accompanying HAC and the posts listed in our forums

Thank you to our forum users and others for submitting such valuable feedback.

Leave a comment

Posted by on 19/03/2012 in Kindle, Updates


HAC and Developing on the Kindle Fire

Yesterday we took our initial look at Amazon’s Kindle Fire tablet and were surprised at its quality of build, display and touch response especially as compared to our budget Android tablets. The Kindle Fire runs a modified version of Android Gingerbread and therefore has some differences from the official Google Android Gingerbread. For instance it doesn’t have the buttons Home, Back and Menu that most Android devices have but instead uses a special menu bar at the bottom of its screen.

Running HAC built Apps
Once we had the Kindle booted up and wifi working we used the Kindle Fire’s web browser to load some of the example apps built by HAC from our website’s projects web page. Kindle Fire’s built in web browser is easy to use and we tried several of the demos including Solar System and they all worked. The Android Info demo accurately identified the device hardware as Kindle Fire so anyone building apps with HAC can be sure their app can successfully detect if it is indeed running on a Kindle Fire.

Some Android developers using the official Android SDK have reported a menu bar problem with the Kindle Fire and we were keen to check this out. At the present time the Kindle Fire’s bottom menu bar cannot be programmatically removed by apps built with the official Android SDK and so the bottom 40 pixels of such apps are always hidden. Amazon do make their Kindle SDK available to developers aiming to create apps specifically for the Kindle Fire and their SDK has the necessary functionality to hide, show and detect the bottom menu bar so allowing apps to use the full screen. However, as HAC won’t be using the Kindle SDK we have a fix in mind to limit the affects of the menu bar problem.

We wanted to connect HAC to the Kindle Fire so as to build and debug apps but amazingly the KIndle Fire doesn’t come with the necessary USB micro B connection cable so we had to order one.

Using HAC to launch and debug apps on Kindle Fire
Today our USB connection cable came but before we could connect up the Kindle Fire to our Windows XP development machine we had to modify a couple of files associated with the Android ADB and USB driver. Soon we will have more details on this but for now here is a link on how to do this :-

By the way, there is a free editor called Notepad++ that is great for editing such files:-

Once we had the USB drivers set up we plugged in the Kindle Fire and started up HAC. From HAC’s “Manage Devices” menu we could see the attached Kindle Fire and therefore ran the DDMS debugger before testing a few projects. Please note that the current version of HAC (v1.12) was used and had not been modified in any way in order to work with the Kindle Fire so we weren’t sure what to expect.

We tried several demo projects such as Hello World, Android Info, Preschool Sums and Lunar Lander. They all worked but we noticed a few problems such as the Kindle menu bar remaining at the bottom of the screen, sometimes images not updating after pressing the Home button and then returning to the app. At least there we no crashes, the button response and graphics events worked as well. The Lundar Lander game ran smoothly and below is a screenshot that shows the Kindle menu bar at the bottom of the screen.

Lunar Lander on Kindle Fire

The Kindle Fire is a very good tablet even though it is running a modified Android OS. Apps built by the current version of HAC do run on it although the bottom menu bar is an irritation as it take valuable space that an app could use.
Our next move is to modify the forthcoming v1.13 release of HAC to work even better with the Kindle Fire.


Tags: ,

Android more reliable than Apple iOS

This short post is about a very interesting article from PCWorld entitled: “Who’s the Smartphone OS Crash Champion?” that presents app crash stats and concludes that Android apps crash far less frequently than iOS apps. For details on the crash reports see the article and its graphs.

Essentially the article examines, quotes and shows the crash results from apps as reported by the mobile app monitoring company Crittercism at

There is also more data and an analysis from Forbes at

Android and iOS
If one takes a very brief look at the articles it might appear that it is the mobile operating systems crashing whereas the reports are actually about apps crashing. Does it matter? Yes, most certainly, because if the operating system crashes it probably needs a reboot of the phone or tablet device and that could lose the users current work or data. Of course a really badly behaved app can deprive the the operating system of resources and perhaps even make it crash, so crashing apps are still a bad thing.

Why the Differences?
Assuming that on average the percentage  of Android apps crashing is far less than the percentage of iOS apps crashing then why should this be? The authors and commenters give a number of reasons but only detailed analysis would really shed light on what is actually happening. Anyhow, here are a few suggestions they made:-

(1) Is it the operating system? Well Android is better at multi-tasking so perhaps it is better at house-keeping, memory, stability etc. The problem is how to measure this from the reports.

(2) Is it the number of operating systems? They suggest that perhaps because there are so many different versions of each operation system therefore developers are having problems making their apps work on each version. However, their stats were from 33 versions of Android and 23 versions of iOS so one might expect the Android to be worse when the contrary is true.

(3) Is it the memory management? – I’m not an iOS programmer so can’t vouch for it but some iOS programmers say it is much more difficult managing the memory on iOS than on Android as the programmer themselves must do it. If true, this would make it much more likely that newbie programmers on iOS would produce less reliable apps than those on Android.

(4) Is it the development languages? – some say Java is more robust than Objective C although Java certainly gives the inexperienced programmer lots of scope to crash their app.

(5) There is also talk of the inbuilt advertising making apps unstable. That might be true because if something in the app starts connecting to the net it might interfere with the app’s natural stability.

(6) There is also the hardware but Apple tightly controls its hardware whereas Android runs on a wide variety of devices from different manufactures. Again, Android should fare worse than iOS but the opposite is true.

Clearly by the reported stats Android apps crash far less than iOS apps but there doesn’t seem a clear case for why it should be. There are so many variables here, different versions of operating system and hardware, types of app, what the app does, and how it interacts with hardware. Perhaps the Android OS is more stable than iOS, time will tell. However, they are both developing so rapidly, so watch this space.

Leave a comment

Posted by on 07/02/2012 in Android OS, iOS


5 How To: Create and Use an Emulator (AVD)

Emulators, also known as AVDs(Android Virtual Device) allow users to test their apps on different versions and setups of the Android operating system without having an actual physical device present. Here we will explain how to create an emulator, launch it and run your app/project on it. At the end are a few tips on emulators.

Creating an AVD in three steps
It is very easy to create an Android emulator using the Android AVD Manager.

1) From within HAC, load the Android AVD Manager by using the menu Android and option Android Emulators.
The AVD Manager image below shows it with no AVDs created:-

1 Empty AVD Manager

2) To create a new AVD click the New button as shown above and the following window will open.
An AVD needs these options setting:- the name of the AVD, the target Android API to use and the SD Card size in MB as underlined in the picture.

2 Create AVD

3) Once the settings have been filled in then click the Create AVD button and it will open the AVD Manager showing the entry for this newly created AVD:-

3 AVD Manager with AVD present

Running an Emulator
There are two easy ways to run an emulator. Firstly by using the Android AVD Manager as shown above, in which case just highlight the required emulator and click the Start button. Secondly, from within HAC using its Android Device Manager as shown below. This lists all the AVDs known to HAC in the top half of the window and displays running AVDs and Android devices in the the bottom half. To run an emulator just select it from the upper list then use the HAC menu Go and option Launch Emulator.

HAC Manage Devices

Running Project on an Emulator/Device
HAC’s Android Device Manager lists all of the running emulators and Android devices in the bottom list. To run the project on an already running emulator or device just select the target emulator/device from the lower list then use the HAC menu Go and option Run Android.
A Few Tips
(1) An emulator’s first run is very slow and newer APIs can take many minutes to start up.
(2) Emulators like Honeycomb and Ice Cream Sandwich do more and so use more resources, therefore on older PCs don’t run non-essential background apps or the emulator might crawl to a halt.
(3) Some of the newer emulators may occasionally crash or freeze during startup but just try again.
(4) Emulator graphics can be very slow but are still very useful in setting up a game or apps screen layout.
(5) If you need to test your game but don’t have an Android device then use older emulators as they will draw more frames/second, run your code faster and be more responsive.
(6) Emulator keyboards can be problematic so use at least one Android device to check its behaviour.
(7) When creating an emulator ignore the density setting as HAC copes automatically with screen scaling.
(8) Test your app on a range of Android emulators.

Leave a comment

Posted by on 07/02/2012 in How-to


HAC v1.12 with Easy Installer

This update greatly simplifies the installation of HAC and the Android SDK. It also adds some improvements and bug fixes.
HAC users now have the option of using an Easy Installer that can set up HAC and a basic Android SDK in 10 minutes or less depending upon the user’s internet connection speed.

During HAC’s first and subsequent runs it is now better at finding the paths to the Android SDK.
A new menu option “Android Emulators” now makes it easier to set up Emulators (also called AVDs).
An important bug has been fixed for non-English Windows systems that affected signing apps with a Private Key.

HAC Installers
As mentioned above there are now two installers available for HAC.
The previous HAC Installer (now called Standard) required the user to either have the Android SDK already setup or to install it themselves. For beginner programers setting up the Android SDK can be daunting as it has many options and can take a few hours to download and fully install.

(1) Standard Installer is about 14MB in size and just installs HAC.
This should be used if you already have the Android SDK installed in your Program Files directory, you are happy with your current Android SDK installation or you are confident in your ability to install the Android SDK.

(2) Easy Installer is about 140MB in size and installs both HAC and a basic Android SDK.
It should be used if the Android SDK is not already installed and you want to get HAC running as quickly as possible. The Android SDK installed by this Easy Installer just installs API 9 (Gingerbread) but can be updated to include the latest or even older APIs.

For further details see the release notes accompanying HAC and the posts listed in our forums.

Thank you to our forum users and others for submitting such valuable feedback.

1 Comment

Posted by on 06/02/2012 in Updates