Archive for May, 2010

iPhone Testbed

May 22, 2010 Leave a comment

Working on with the testbed to see if it’s working in iPhone and see the framerate of the app on the device and watch app behavior on the device.

The thing is I am using SDK 3.0, which is a dinosaur, waiting for an update from a team member, I can’t compile it right to the emulator, the new app library won’t support it at all, error almost 500, I got lazy to fix it, then just try to build to device target using self sign certificate, then package it into .ipa, throw it into the iTunes, sync with the iPhone, and

BAM, it worked like a charm, no conflicts and framerate working good, so far so good, this makes me optimist that I can deliver my project, simulation OK, framerate OK, next step design the UI.

Categories: iPhone

Android 2.2 Froyo is here

May 22, 2010 Leave a comment

Finally my long list missed features on the Android ecosystem is there now in Android 2.2 Froyo.

Just seen the Google video of android, I saw there’s a couple improvements that being made by Google, one that I care the most is the animations power, the Froyo can maintain reasonable FPS with a lot of sprites being drawn instead of Eclair 2.1, this is truly what I was waiting for, I also hope this version will minimize the hiccup by a lot. But, considering the Java, I think the hiccup is always still be there if we don’t careful with the GC allocation. From what I heard, Froyo only works for high end phone with at least 256MB ram, this makes it difficult for current phone to update to Froyo, phew….

Just remember people: Do not allocate during animation update, pre allocate the assests, and manually remove allocations, and treat Java like C++, and uses Native a lot if you can…

Haven’t got the time to download and test it yet, still busy on the iPhone part of my pet project..

But, I do like if my long list missed features in Android is there now…

Categories: Android

Making and Running iPhone App without App Store

May 17, 2010 Leave a comment

Phew, another test and trial…

Been doing some coding in iPhone, and I hate to pay $99/year to Apple, so for you guys who doesn’t want to pay $99 to Apple for just coding for your iPhone, here’s the trick.

First, Jailbreak your iPhone, google: Jailbreak iPhone.

Then, open Cydia and add this repo: into your Cydia Source, it’s in the Manage tab.
Now, Search for AppSync app, install for your iPhone firmware version, it’ll be AppSync 3.1 or AppSync 3.2 (iPad).
I prefer using AppSync than Installd, it’s just a matter of preference.

Now, this AppSync will patch your iPhone so it can install any app that don’t have codesigning.

After you install this, a couple things should be made in the Xcode, but I won’t discuss it here.
Then build the app (using Build not Build and Go) set target to the iPhone device, then compile.

Make a folder called Payload, put your .app file there, then go to upper directory, add a JPG file 512×512 rename it to iTunesArtwork then zip that 2 items Payload and iTunesArtwork into a zip file, rename it to .ipa file, put it in your iTunes and sync it to your iPhone.

Final: Tap your installed in the iPhone, it’ll work.

Forgot one thing, add this into your app-Info.plist:

Apple iPhone OS Application Signing

This should do it…

Categories: iPhone

Android Hiccup.. Hiccup..

May 12, 2010 Leave a comment

Just bought the Samsung Galaxy Spica just to test a OpenGL ES program that I made, and all I got is hiccup on the animation.

In order to make an app in Android you need to use Dalvik Java which has a Garbage Collection.
This GC will free the memory you allocate automatically without the need to manually deallocate it yourself, this is indeed a luxury at your disposal, but a drawback in performance for animation based app.
GC will collect all unused memory allocations on its own without our control, this collection will took time for a couple msec.

Imagine you have an animation loop that always render frame in that loop, this animation should never be delayed in order to have a smooth animation, but this GC thing will delay your animation loop for maybe 100msec, and this is a death to your animation, and I already proved this in my app. The animation is always has hiccup, not smooth. And I hate Google for this.

This is happened because Google insisted that developer should use Java instead of Native Development.

2 Things absurd from Google Android design:
1. It uses linux, but doesn’t support GNU Linux library (GLIBC), so other linux project can not be easily ported, instead it uses its own libc called Bionic.
2. It uses Java, but doesn’t support Java library well, perhaps a little of it, but not all.

Now, how do we create an app that has smooth animation?
Lucky us, the Google guys provided us with JNI (Java Native Interface).

JNI is a mechanism that Google developer provided us to be able to call native shared object (.so) or in Windows we called it DLL file (.dll). a shared object library is a native ARM compiled binary that runs on Android natively, and it can communicate with its Java Dalvik Activity through JNI.

Here’s the short explanation,
You create a program in Java Dalvik, then this Java Dalvik app call a (.so) native library (in C) that doesn’t have GC on it, so it’s like our own free native app where we can put our animation loop in this native code where GC won’t interrupt and delay our application.
But, this native uses C and minimal C++ library. The odd things that I explained above is that in order for us to compile C in linux we need GNU LIBC, but since Android doesn’t support this we need to use Google own libc called Bionic, this support C++ but lack of Exception, etc.

Bionic is part of Android Kernel. Since Android Kernel is a monolithic design, so in order to create a native bionic library, you need to download the whole Android Kernel, yes the WHOLE ANDROID KERNEL, and it’s about 2.1 GB, would you download such this big kernel just to create a regular animation app?

WOW that was great and confusing, BRAVO GOOGLE.

APPLE iPhone SDK is far more mature than GOOGLE Android if I may say, Apple iPhone SDK is the most comfortable sdk I have ever used for Mobile Device.

Another drawbacks of Google Android:
1. It can’t install and run applications in your sdcard because the lack of DRM or app encryption in Android that made the Google guys decided not to put your app inside your sdcard so anybody can crack it. In order to be able to install apps on your sdcard, you need to root your android and install apps2sd.
2. It has WiFi but can’t connect to AdHoc connection, what the? this is the most annoying thing for me, since I usually use my AdHoc connection to connect my cellphone to the internet.

Categories: Android