Archive

Archive for the ‘Mobile’ Category

PrimoSpot – Find parking space EZ in metro cities

August 24th, 2009

We all know how hard it is to live in the city while having a car, traffics and all that. But the most frustrating task is to park your car. Enter PrimoSpot: find free on street parking and compare parking garage prices. Search thousands of metro city parking signs for regulations and time left at a parking spot.

You can use the website to plan your trip: finding possible street parking spots, nearby garage hours and fees. And if you ride a bike, find a bike rack there too! You can also download the iPhone app on your iPhone so you can check up parking information wherever you go.

Tonight, I’m here to announce the launch of PrimoSpot Android app, available on the Android Market now! Go check it out! “PrimoSpot Parking” is the app name! Search “Parking” or “PrimoSpot”, you will find it on top of the list! This is THE ONLY app on the market now to help you find parking space!

We have NYC and Boston currently supported, but will expand to other metro cities very soon. There’s also a universal online widget available soon that you can embed in any web pages.

Meanwhile, here are some screen shots of the app in action:

Some Features:
- Uses GPS to find parking information around your current location
- Search entered address to find parking information
- Compare garage prices
- Remember where you parked your car with some reminding notes

Go grab a copy if you live in NYC and Boston and let us know what you think ^_^

Happy Driving!

Android Shogun Android, Mobile, iPhone , , , , , ,

Is Palm’s webOS already a lost cause?

August 21st, 2009

We all know the Palm Pre launch was a big success! I myself picked up the Pre on day one, along w/ a 2-year Sprint contract (weeping…). Merely less than 3 months after its launch, Palm webOS seems to have lost its momentum. Here I will use my own personal experience to write some of my thoughts on webOS in general, and why there’s an uphill battle for Palm to take on going forward.

Underneath webOS lies the embedded linux, much like Android, Nokia Maemo, etc. It’s reliable and proven in the smartphone OS market. On a higher level, Mojo SDK makes up all the high level APIs and frameworks. It mainly uses JavaScript to bridge the low level events/callbacks and high level API, such as GPS coordinates information, accelerometer readings, camera controls, etc. This approach is somewhat like those JavaScript frameworks, such as PhoneGap, http://sourceforge.net/projects/quickconnect/, and Rhodes, where they try to use the common framework built in JavaScript, and uses JavaScript to call underlying low level APIs in the devices, such as Android, iPhone, BlackBerry, etc. This architecture is very cool, but also brings down the performance, comparing to native SDK APIs found in iPhone and Android. For example, the Pre accelerometer is only at 4Hz (4 sample readings per second), comparing to about 100Hz in iPhone. This might be enough for casual usage, but certainly not enough for some serious gaming controls.

By the way, Palm opened Game Developer Cafe to try to lure some game developer on webOS. But without Open GL ES support on the API level (Pre’s hardware is comparable to iPhone, and is capable of running Open GL ES), it’s hard to find serious game developers who want to develop for webOS. You might say you can use canvas in webkit and build game on top of that. Well, canvas performance is still not up to the task, and plus, the current webOS webkit’s implementation of the canvas is not complete. Many essential features are missing, such as reading pixel data.

Mojo and webOS are based on HTML5, CSS, and JavaScript. They are all web standards. That’s where the “web” in the webOS name comes from, right? However, I found this below sentiment troubling. It’s an email from Palm’s product manager:
- Have an appealing design and user interface aligned with Palm UI guidelines and optimized for webOS (i.e., not a “browser” app)

Not a browser app? Are you kidding me? Are you turning your back against your foundation? Apple can rightfully deploy such bind-your-UI-to-my-HIG ‘cuz it’s an Apple product. You Palm is NOT Apple, yet. This is not a way to distinguish yourself. What you should do is to attract as many web developers to your webOS platform as possible. Not creating yet another new system for them to learn. Honestly, there are plenty of guys who can create better UI widgets/elements than the built-in Mojo widgets/elements. Please, Palm, stay to your core value. webOS apps ARE browser apps.

I also heard Palm’s working on virtual on screen keyboard recently. It’s cool and all. But before you doing that, take a look at this article: Virtual Keyboards on iPhone and Android. Please remember, no matter what you do, a virtual keyboard on a 3.1″ screen is never going to match the virtual keyboard on a 3.5″ screen. You just can’t grow the physical screen size.

As to the Mojo framework, my biggest disappointment is the lack of built-in Map API. In order to use Map embedded in your own application, with your custom marker icons and all, you will need to include external AJAX Map APIs, such as Google Map API v2/v3. These APIs work well, but they are not optimized for mobile devices. A Map API is a must for modern mobile OS. Though Apple only recently in their iPhone SDK 3.0 have they included the much needed Map Kit framework. But it works beautifully!

My biggest concern for webOS, however, is its openness of app source codes. Anyone can download the public SDK, enable developer mode on their Pre by entering the classic magic Nintendo cheat code, hookup the Pre with the USB cable, and bang, you have root access on your Pre. There, you can find virtually everything, including source codes for ALL the apps pre-installed and downloaded. Back a few years ago, when most websites were still running on static HTML, I used teleport program to download every single link/page on a given site. It’s messy but it gets the job done. Nowadays, with all these dynamic page scripting and web 2.0 stuff, it’s virtually impossible to get the complete html/css/js codes from any website. With palm webOS, it’s just a click away. Download the app, and there you go, the WHOLE app source codes! In there, you might as well find API Keys used by developers, possibly login information if not coded carefully. I was shocked that Palm didn’t even bother to put in some handy JavaScript compressor and confiscator, such as JSLint and Stunnix JavaScript Obfuscator and Encoder.

This was my big concern before webOS/Pre launch. As a developer, unless my project is open source, I take very careful steps to protect my codes, codes that I write with sweat and blood. Now on webOS, anyone with minimal efforts, can see everything I code up there. This is very discomforting, and Palm MUST address this issue or many developers will unlikely to jump to the webOS bandwagon.

The launch of iPhone 3Gs back in July killed some of webOS/Pre’s momentum. Even though Apple added not many cool features comparing to iPhone 3G. But with a large existing user base and die-hard apple fans everywhere, iPhone 3Gs has been selling extremely well, even in Japan! Meanwhile, Android is on route to be on a bunch of handsets by end of this year. Samsung InstinctQ and HTC Hero on Sprint around October, Motorola Sholes on Verizon, HTC Click on AT&T, G2 myTouch and Motorola Morrison on T-mobile. If Palm cannot address the source code protection issues, if Palm does not launch their second webOS phone (EOS?) by October, we have plenty of reasons to believe the battle against Apple has long been lost. If webOS’s licensing model is not as open and/or flexible as Android so that other handset manufacturers can put it on their own handsets, webOS could very well become a niche mobile OS, a mobile OS we us geeks are fond of hacking and tweaking, but will never reach the status of mainstream modern mobile OS.

Please Palm, do whatever it takes to address these serious issues! I wish Palm webOS best luck, however, the time is not on their side…

Android Shogun Android, BlackBerry, Mobile, Palm webOS, iPhone , , , , , ,

JavaEye.com Android Client Version 1 released!

August 8th, 2009

JavaEye is a software developers’ community site based in China.

Established on September 2003, JavaEye started with topics only
concerning about Java and Hibernate. Since then it has expanded to topics related to all software development disciplines. JavaEye was selected as the best 10 technology websites in 2005. We also obtained a lot of useful information from this site frequently; Therefore, we decided to bring this site to android platform.

The app took us 3 developers and 20 days on our spare time to finish.

The current alpha version has chat, site message inbox, and bookmarks features.

We utilized JavaEye.com’s API to accomplish the above.

This application is available on the Android Market. You can search it from your android phone by keyword “JavaEye”.

For those who did not have an android phone, you can download this application from the following link:
http://www.ChinaAndroidDev.com/apks/JavaEyeClient_1.0.1.apk

We are working on the next release. We are aiming to add GPS location/Map, Voice mail , background checking and notification

Android Shogun Android, Mobile , ,

My 1st BlackBerry App :)

August 8th, 2009

Oh well, I haven’t updated my blog for a LOOOOOONG while, sorry was being real busy!

Anyway, I published my 1st BlackBerry app on the BlackBerry App World!
It’s a simple BAC (Blood Alcohol Content) Calculator for my friend Henry!
It’s called Drinkulator!

009

009

It’s designed for touch screen BlackBerries for now, e.g. Storm and soon-to-be-released Storm 2.

BlackBerry uses J2ME and their own version of J2ME. In some sense, I actually like that. It’s a custom/specialized J2ME in a way. It has nice APIs for push notification, message delivery, locations, media, etc. I’m just starting to scratch the surface!

My next BlackBerry app will be much more in-depth and involves GPS and Maps. Stay tuned… and hopefully I can deliver by end of this year ^_^

BlackBerry App World, BlackBerry, J2ME, Mobile , ,

2 OMS phones spotted… 移动支持的两款OMS手机

May 17th, 2009

OMS – Open Mobile System, is based on Android, customized by China Mobile. There are a few rumored phones that would run OMS. Today, at the mmarket (mobile market for China Mobile), I found 2 OMS phones at
the registration page.

Dopod A6188, 320×480, internal GPS, 3.2MP camera. (Dopod is the brand which HTC sells phones in China).

Borqs JadeSpring. Borqs is the company which customized Android to be OMS :) Seems like a secret phone for now. In Chinese, it means 玉春… ? Sounds weird…

Truly interesting!

Android Shogun Android, Mobile , ,

NPR Podcasts updated with native Music Player

May 5th, 2009

As I slowly figuring out the ins and outs of Android, I’ll getting more updates out on my apps on the Market. Tonight I updated the NPR Podcasts app w/ built-in Music Player:

010

It’s actually pretty easy, you pass the Uri of the MP3 file to your intent, and fire it off. The system will broadcast that intent and a suitable Music Player will be chosen, or the user will be prompted to choose one if there are multiple available players registered to play the “audio/*” mine type.

Here’s the little codes:

Intent intent = new Intent();
intent.setAction(android.content.Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), "audio/*");
context.startActivity(intent);

The app is updated on the Market now. Download and enjoy!

Android Shogun Android, Mobile , ,

My entry to win one of 10 Palm Pre at EverythingPre

May 1st, 2009

EverythingPre is running a contest to give out one of 10 Palm Pres
Palm Pre contest

Here’s my photo entry:

G1 and iPhone, trying hard to be Palm Pre

G1 and iPhone, trying hard to be Palm Pre

Head over to their contest page here

Android Shogun Mobile, Palm webOS , ,

We won Honorable Mention w/ our iPhone app: Congress Bills in Sunlight Labs Apps for America Contest!

April 20th, 2009

My iPhone app has just won Honorable Mentions from Sunlight Labs Apps For America Contest!
It’s out of a pool of 45 apps/websites ^_^
Here’s the winner announcement and list:
Winner List
Here is how they determined the winner. Looks like Congress Bills are ranked number 11th among all 45 entries. Pretty good considering we did it in our spare time comparing to some relatively large team working on their complete feature-rich websites. In that sense, we are happy about the results. Though I did have some suggestions for the next contest as I replied to their blog:
First, thanks for your all GREAT efforts in making this happen!

I do have suggestions in the next round to have a mobile-specific category. Our app, Congress Bills is an iPhone app. Since it was still during Apple’s review during the judging period, we offered Ad Hoc version of the app providing that judges send their iPhone UUIDs to us. But none of the judges did that. Might be due to the fact that they don’t have iPhones. But the truth is that they had to judge the app purely based on the video on vimeo, screenshots, and blog descriptions. Since the mobile device is a very different kind of media than website, there are unique features/advantages exhibited from them. It’s sad that the the app did not get a complete look (from our opinion) to be rated.

We are also having an Android version of the app running btw.

I would suggest that in the next contest, state whether you will have sufficient resources in judging mobile applications. Resources such as the availability of the mobile phones, and the models of them. Since the contest rules said any platform, I was actually thinking of building a robot that can etch laser on the wall showing the current activities of the congressmen. Oh well, that went a bit too far :)

Thanks again!

*It’s an open source iPhone app with LAMP backend. I will update more on details later…

iPhone Mobile, iPhone , , , , ,

How to detect shake motion in Android – part I

April 17th, 2009

Gesture/Motion-based detection is fast becoming an integral part of many mobile applications.

One neat usage of it is to shake to erease.  The first one I’ve encountered is SketchUp from the early days of jailbreak iPhone.  Then there are shake to delete done-items on your todo/shopping list, etc.

There are many approaches to detect shake motion, one is from ClingMarks.  Basically it calculates the total delta (changes) in all 3 axises: x, y and z between the current even time and the previous one, and divide by the time elapsed to find its psudo-velocity.  (I call it psudo because it’s not actually a velocity in any direction; it’s more like a mixed-up velocity from 3 axises).  If this velocity is greater than a pre-defined threshold, it’s been viewed as a shake motion.

From the code point of view, you need to implement the SensorListener:

public class ShakeActivity extends Activity implements SensorListener

You will need to acquire a SensorManager:

sensorMgr = (SensorManager) getSystemService(SENSOR_SERVICE);

And register this sensor with desired flags:

ensorMgr.registerListener(this,
SensorManager.SENSOR_ACCELEROMETER,
SensorManager.SENSOR_DELAY_GAME);

In your onSensorChange() method, you determine whether it’s a shake or not:

public void onSensorChanged(int sensor, float[] values) {
if (sensor == SensorManager.SENSOR_ACCELEROMETER) {
long curTime = System.currentTimeMillis();
// only allow one update every 100ms.
if ((curTime - lastUpdate) > 100) {
long diffTime = (curTime - lastUpdate);
lastUpdate = curTime;

x = values[SensorManager.DATA_X];
y = values[SensorManager.DATA_Y];
z = values[SensorManager.DATA_Z];

float speed = Math.abs(x+y+z – last_x – last_y – last_z) / diffTime * 10000;

if (speed > SHAKE_THRESHOLD) {
Log.d(”sensor”, “shake detected w/ speed: ” + speed);
Toast.makeText(this, “shake detected w/ speed: ” + speed, Toast.LENGTH_SHORT).show();
}
last_x = x;
last_y = y;
last_z = z;
}
}
}

The shake threshold is defined as:

private static final int SHAKE_THRESHOLD = 800;

This is pretty straightforward. So if your app just simply needs a shake motion detection, w/o needing to know on which direction it’s shaken, this code is good enough. However, there are situations where a non-shake motion would be detected as shake due to the fact that the formula is not actually the correct or should I say a precise formula for determining the shake motion. I call this a coarse-grain approach.

In my next post, I will show you a more fine-grain approach, something I learned from iPhone SDK programming :)

You can download this sample here

Happy Coding!

Android Shogun Android, Mobile, iPhone , , ,

How to implement Swipe action in Android

April 16th, 2009

To implement swipe action in Android, such as the one used in iPhone homescreen unlock, actually Android SDK provides native support for gestures. Swipe is actually called Fling ^_^

You will need to extend SimpleOnGestureListener to implement your own handling on swipe/fling action:

class MyGestureDetector extends SimpleOnGestureListener {
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
}

To determine if it’s a valid swipe, you will need to make sure the fling falls into an almost straight path, with at least certain length of touch duration, so it’s a continuous touch, and with certain velocity of course.

So let’s define some constants:

private static final int SWIPE_MIN_DISTANCE = 120;
private static final int SWIPE_MAX_OFF_PATH = 250;
private static final int SWIPE_THRESHOLD_VELOCITY = 200;

The max off path is to make sure the fling still falls within a somewhat straight path.

If onFling() method, you can do this:

if(e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) {
viewFlipper.setInAnimation(slideLeftIn);
viewFlipper.setOutAnimation(slideLeftOut);
viewFlipper.showNext();
} else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) {
viewFlipper.setInAnimation(slideRightIn);
viewFlipper.setOutAnimation(slideRightOut);
viewFlipper.showPrevious();
}

The viewFlipper is used to show how fling/swipe make the view animation/transition from one to the other.

At last, you need to make sure in your activity, you catch the gesture event by overriding onTouch() method:

@Override
public boolean onTouchEvent(MotionEvent event) {
if (gestureDetector.onTouchEvent(event))
return true;
else
return false;
}

Here’s a screenshot of the view in transition:

Android Swipe View Flipper in Action

Android Swipe View Flipper in Action

The sample source is attached here.

Android Shogun Android, Mobile , , , ,