Mittwoch, 3. November 2010

RIM now part of Java Executive Committee for Java ME

RIM and Samsung are now having a seat for Java ME in Executive Committees (EC) of Java Community Process (JCP).

As both are having better platforms (RIM has a lot of extensions to ME and Android for Samsung).
That's a hopefully a good sign in renewing Java ME.


Source: heise.de

Freitag, 8. Oktober 2010

setBackground does nothing?

Every time I am using to beautify my BlackBerry screens with a background I trap into the same pitfall. Over and over again.

Her it is:

Simply trying to set the background colorr for a Screen instance:

myScreen = new MainScreen();
myScreen.setBackground(BackgroundFactory.createLinearGradientBackground(Color.BLACK, Color.BLACK, Color.ORANGE, Color.ORANGE));

But when you push this screen to the display stack there will be nothing but a white screen.

Remember to do this like this:

myScreen = new MainScreen();
myScreen.getMainManager().setBackground(BackgroundFactory.createLinearGradientBackground(Color.BLACK, Color.BLACK, Color.ORANGE, Color.ORANGE));

Montag, 13. September 2010

Review: Android Netbook Toshiba AC100

I just had the chance to test one of the 1st netbooks with Android.
Today so called netbooks ship with Windows XP or 7 installed nd have big hard drives. Actually they are just smaller notebooks.
The Toshiba AC100 goes back to the original idea of netbooks. It only comes with 5GB of hard drive (probably flash) uses smartphone hardware to be ultra small and have good battery life. And what could be better then putting Android as operating system?
Toshiba used version 2.1 and it works surprisingly well. The device is a normal netbook, Android was designed for touch devices. For navigation you have a normal mouse cursor, the normal touch is mapped to left mouse key, the menu-key as right mouse key (comparably to Windows context menus) and the Windows-key is replaced by the home-screen buttong. A typical Microsoft user has to forget about double clicking and the long click is sometimes a pain. But most of the time the device is a lot of fun.


The device ships with email app, browsers (Opera Mini or Google) an office suite (Docs2Go), a file explorer what do you need more?
Sadly it does not have a marketplace yet, it uses an own appstore called Camangi which is still very limited. But you simply can download any apk file via the browser.


The device itself feels pretty good for cheap plastic and looks much nicer as some of the more expensive variants.
It supports 3G via any SIMCard (inserted behind the battery) or any wifi network. The battery should work for 8 hours, thats at least what the manufacturer is telling. It needs some seconds to get out of sleep mode but it's still acceptable and you normally don't have to shut it down.

With 379€ it's still a little expensive, I could by a Windows netbooks for nearly this price but.
But I would recommend it and maybe I'll use it on my next trip instead of carrying my Windows convertable.

Freitag, 3. September 2010

Import your BlackBerry Contacts on Android

I did it! I moved to Android!
I am owning a Google Nexus One now!

But I wanted to have all my contacts on my new phone as well.
Therefore I wrote a small little app that exports all contacts to SDCard, because Android can search your SDCard for contact files (VCards: *.VCF)

I published the app for free: http://www.jodamob.de/vcardexport.html

Dienstag, 3. August 2010

Missing AppWorld icon?

I just lost my AppWorld app on my Storm 9550. No icon anymore.

I tried to reinstall it but it showed I have the newest version installed:



So I tried to write an app that finds and starts:

The code module name is "net_rim_bb_appworld". Then you can get the descriptor
CodeModuleManager.getApplicationDescriptors(...)
which you can use to run AppWorld:
ApplicationManager.getApplicationManager().runApplication(...)

But there is something really wrong. AppWorld is running but does not do anything. When attaching it shows:

[AppWorld - Debug(INFO) ] - Version mismatch ( old: 1.1.0.33 new: 1.1.0.35) Clearing Caches!
[AppWorld - Debug(INFO) ] - -=-=-=-=-=-=-=-=-=-=-=-=-=READING DB-=-=-==--=-=-=-=--=-=

and then for decaded continues "READING DB".

So it seems AppWorld has a really bad update problem. But what gives me a really bad feeling is that RIM know about this and the only chance is "backup and wipe".
http://www.blackberry.com/btsc/search.do?cmd=displayKC&docType=kc&externalId=KB22944
Sorry RIM this is not an option for your users!

It shows again that RIM does not care much about apps and app stores. AppWprld 1.1.035 is still the latest version, there is no hotfix which I would expect on such a big issue.
Just another nail to their casket?

Montag, 5. Juli 2010

Nokia starts fighting back. Where is RIM?

The new Nokia boss for mobile solutions want's to "fightback" to get Nokia back to the top.
It seems they have realized their position their loosing ground, which was lately very well described by the guys from symbian-guru.

When I read those last words from symbian guru I had to think about BlackBerry. A lot of it reminded me about RIM:
  • software that had a higher quality in the past;
  • their inability to build a good app store;
  • the ignorance about their own position.
    This was perfectly documented with this year's poor WES statements (a Bold in white color, a emberrassing study about BlackBerry users beeing happier then iPhone users and a tiny UI polish called OS 6 which they called "the biggest step they ever took" and everyone's afraid that RIM really believe's that)

I really like my BlackBerry but as the Symbian gurus my next phone will be an Android.
I really like developing for BlackBerry and I hope at some point RIM will start their own "fightback".

Dienstag, 29. Juni 2010

BlackBerry Developer Day Hamburg

Just returned from Blackberry Developer Day in Hamburg.
It was much better then I expected although still very introductive.



A lot of attendees had already iphone or android apps developed and are now trying to find out how complicated BB development would be.
This mapps to a survey by Appcelerator where BB is number 3 in developer interests:
http://www.appcelerator.com/mobile-developer-survey-june-2010/

Everyone with BB experience aggreed that RIM has a platform with a much higher learning curve at least in the beginning. Therefore the support forum seems to be most important institution.
I had also a lot of interest in the Blackberry Developer Group in Berlin. Hopefully we'll have some more groups soon.

Don't forget, today is mobile tuesday: http://www.facebook.com/event.php?eid=123601887675677&ref=mf

Mittwoch, 23. Juni 2010

Multiclipboard for BlackBerry

Just uploaded a private app development:

Multiclipboad: the idea:
Use your standard copy menu but paste via the new paste (multiple) menu. Choose from every part of text you copieed lately and have a easy manageable history of your clipboard items. No more application switching when copying multiple entries. View the content of your clipboard and keep your important text snippets always at hand. And the best: the list persists reboot :)




http://www.handango.com/catalog/ProductDetails.jsp?storeId=2218&deviceId=2432&platformId=40&productId=270573§ionId=0

Freitag, 18. Juni 2010

AppWorld near to Robbery?

I just wanted to create an AppWorld vendor account for distribution of a private app I developed. But I just realized the pricing is awful: 200$ for 10 submissions including refuced apps, that's even worse then the announcements for Windows Phone apps.

I always wondered why there are so few apps in the store compared to Android Marketplace for example. I always thought that's because of many providers do not distribute AppWorld but know I think RIM does not get the small developers because of their pricing policy.

I myself will go to other stores now with my app.

Dienstag, 15. Juni 2010

Blackberry Developer Day in Hamburg

There will be a Blackberry event in Germany this month:
June 28th
One day in depth Blackberry development. If you are new to BlackBerry development you should join this free event, it's a great overview and start.

http://devblog.blackberry.com/2010/06/blackberry-developer-days-in-europe/

Sonntag, 13. Juni 2010

.. about Windows Phone 7

I visited Microsofts Tech Talk in Berlin about Windows Phone 7 last week. And now after some days as more as I think about those 4 hours the more disappointing I am about it.

Why?
They copied from all 3 successful platforms: iOS, BlackBerry, Android. Just look at the featues and you can tell where they are from. That does not have to be bad, you can copy and make it a great product. But only if they would have copied the best. But they copied a lot of bad thinks, too:

- no shared file storage (incl no changeable SDcards)
- no interprocess communication
- no multitasking (no services, no background processes)
- application can only be installed via marketplace
- no copy&paste

You can do these things to your developers and users if your name is Apple and everything you say will be handled as religion. But if your name is Microsoft and you have lost a lot of developers with Windows Mobile? I don't think so.

Also I did not saw any bluetooth on the OEM restrictions or APIs and because the OEM can not extend the API's there probably won't be any bluetooth for developers soon. And the list goes on: there is no access to the videostream, this means no augmented reality apps!

Somethimes I thought they talk about MIDP 1.0 from the year 2001. Why? Mostly because of:
- no socket connections!! Only HTTP(S) is allowed

I know it's hard starting all over again and they promised a lost of things will come later but aren't they already too late?

I also think MS copied a big mistake of J2ME: developers are getting frustrated if native apps can do much more, if your app looks like a native app but is always slightly different. They made the same now again: developers have to use Silverlight3/C# apps but the apps on the device are not implemented that way (you can tell because the icons for app must be in 2 resolutions as pixel graphics but all icons withing your app will be vectory SVGs). If the apps itself would be programmed with the same language and APIs any problems or restrictions will be found before the release of the platform but now they will be detected by us and it will take long to get them into the platform.
That's why I like BlackBerry: nearly all apps are implemented in Java, this is how they developed a lot of tools they needed and provided them to the community as well. But if your 3rd party API always will be a VM layer on top of your's you don't care.

But MS doesn't seem to care about development community. Another example is their marketplace: As an app developer you can only upload 5 apps within a year for free (if your app is free). And it seems (the MS guy did not know for sure) this is not 5 apps but 5 uploads even the one that failed the MS tests. Didn't MS realize that free apps is what makes appstore successfull?
It's the apps stupid!

Donnerstag, 10. Juni 2010

1st Meeting of BlackBerry Developer Group Berlin

Come and talk to us:
nerdy blackberry talk with beer or lemonade at tuesday 29 this month:
http://www.facebook.com/event.php?eid=123601887675677&ref=mf

Freitag, 4. Juni 2010

Uncaught Exceptions and the BlackBerry Whitescreen

Most BlackBerry developer experiences an uncaught excecption at some point.
Very oftens it's a RuntimeException the developer did not expect.


What's the best way to find it?

The default behaviour is to choose "continue" and search for the problem in the code.
This could be done by looking into the EventLog where uncaught exception will be logged with full stack trace (see also

But did you ever scroll through all the options?
There is "attach debugger" which is the easiest way to find the problem when this happens in the simulator.


Simply connect your Eclipse via "Debug As" -> "Remote Java application" to default port 8000. Afterwards(!) click "attach debugger" on the simulator.


Voilà! :)

You will be directly sent to the codeline where the exception occurs with full stack trace available, you can check all the variables. Finding an exception was never easier

Montag, 17. Mai 2010

BlackBerry Developer Group Berlin founded

We just launched to offical BlackBerry Developer Group for the region of Berlin.

We start with a facebook group but we will expand it:
http://www.facebook.com/pages/Berlin-BlackBerry-Developers/
We are planning regular meetings to talk about BlackBerry development.
Join us now! :)

Mittwoch, 5. Mai 2010

WES is over. What's left?

No big news.
Some ui polish called 6.0
Some device polish (they made a big deal out of a white Bold).

BESExpress and the mobile voice system where the biggest topics.

From a developer perspective they announced some APIs, no big deals either. The most interesting payment API is still far away.

SuperApp was the big program they try to force developers into. My understanding of the idea is: show us apps that won't be possible with iPhone (always one, deeply integrated with native apps...).

For their development tools they still don't have Windows7 support but keep talking about MacOS. They seem so busy with themselves there seems to be no big plans for real platform changes: hot topics from devcon like shared libraries, unit testing or even language changes aren't there anymore or just too far away to even talk about it.
In addition: With HP announcing the aquisition of Palm just one day after having a keynote presentation with RIM must have been quite embarissing for BlackBerry.

My 5th WES was the most disappointing one. It's kinda scary: I'm flighing home and they did not convince me that Blackberry is the coolest, best device on earth.

Mittwoch, 28. April 2010

Any WES news? none

Yesterday at teir annual WES conference RIM announced their new Operating System 6.0 which will be soon available (next quarter). For me it looks disappointing. On most screens it was actually hard to tell what was new in there. It's a little nicer but I can't see any major chances by know.



They announced some new devices but also it's nothing new: a Bold and a new Pearl.
RIM is still number one but with so little effort it's hard to tell how long they will stay on top....

Freitag, 19. Februar 2010

Print stracktrace to BlackBerry eventlog

The BlackBerry Eventlog (accessable via ALT-LGLG on most devices) is great.
An application can log everything it wants starting from errors up to debug information. And: for uncaught exceptions a full stacktrace is written! Every wanted to use this in your app as well?

It isn't possible to access the stacktrace of an exception. ME does not know "getStackTrace()" there is only "printStackTrace()" which write to console only available for the exception classes. Also ME does not allow to redirect System.err or System.out to get to this information.
The only chance to see the stacktrace of a caught exception is to use printStackTrace() while in attached debugging mode.

But there is a nice trick to print the stacktrace directly to the eventlog: catch Throwable:

try
{
return instance.doAction();
}
catch(Throwable exc)
{
return false;
}

If an exceptions in doAction() occurs (as our best friend NullPointerException) it will be written by the system directly to eventlog. This won't happen if you catch Exception or RuntimeExcepion or more specific one.

Freitag, 5. Februar 2010

How to break Mobile Software

In the last days I tested a few apps from colleagues of mine. I found some nice bugs which I often found by doing similar actions, It didn't matter if this was an Android, iPone or Symbian app.
Somem years ago I saw a presentation of James A. Whittaker at a conference in Munich, this guy had so much fun in breaking software. He actually wrote some books about testing:
"How to Break Software" and "Hot to beak Security"

In the last days I had probably the same fun trying to break those mobile apps. Some tipps from the book can be applied also on mobile apps, some other things where different, so maybe it's time for:
"How to break Mobile Software"

Here are some things that worked for me:

(Mis)Use Copy and Paste
Most smartphone supports copy and paste nowadays. And with this nice feature you can start attacking all kinds of ui elements. Assume there is an input field with some limitation, this could be the lenght of characters allowed or characters that are forbidden to type. Try to paste illegal stuff into it. This often works and is a well known test-strategy on desktop applications. It's time for bringing it to mobile phones!

(Mis)use Multitouch
Since iPhone Multitouch is the next big thing for user interaction. But it's even better for an evil tester. Try hitting 2 elements at the same time, whether it 2 listeelements or 2 icons. Most applications are not designed to be protected against this. There is no deselect between the events so the app gets out of sync. Often a thread is started for an action and there is no synchronization that could stop this. Chances are high that you create strange effects on the app. And if the app get's into a strange situation for example overlapping menus: don't stop! This is your chance, now you have good chances to crash it and win by knock out.

(Mis)use Softkeyboard
Since the iPhone started a huge amount of devices came without any keyboard. They have so called soft keyboards that appears where needed on the screen. Try to get the keyboard at a point where it is not needed and use it. Maybe you can confuse the app.

(Mis)use Orientation changes
Accelerometers are more than a nice toy. But writing orientation aware apps isn't easy. Ever saw text falling out of it's boundary dialog? Try to rotate the device in the middle of an action, maybe you have the luck to find such a problem.

Donnerstag, 4. Februar 2010

BlackBerry JVM errors

More as a reminder for myself than a normal blog:

http://www.blackberry.com/developers/javaknowledge/general/kpa0307163334.shtml

good to know:
When you have one of those JVM whitescreen you can still use javaloader.
I could capture a screenshot and grab the eventlog.

Dienstag, 2. Februar 2010

Oracle and Microedition?

Just watched Oracles webcast about the upcoming Java strategy after acquisition of Sun:
http://oracle.com.edgesuite.net/ivt/4000/8104/9236/12630/lobby_external_flash_clean_480x360/default.htm
Best news for Java mobile developers: the plan is to merge ME and SE!
Best news of the day for me. 2 years ago at RIMs annual developer conference the head of Java development for BlackBerry said in a session this would never happen for their platform, so we'll see. Now there is a big player involved as well ;-)

It will obviously take a while but Google showed how to build a modern platform with Android based on Java SE. It will be interesting to see what will happen next.
Interesting: JavaFX and Netbeans are both part of the mobile strategy. It will be a thrilling year for mobile java world.


Here's the ME slide:

(c) Oracle 2010

Dienstag, 19. Januar 2010

Getting redirected

I just ran into a problem with HTTP redirects.

As a BlackBerry developer I don't have to deal with those 30X responses as long as the BIS or BES is doing the HttpConnection. Those services follow every redirect automatically and the clientside call to HttpConnection.getResponseCode() will get only return the final result. The application will not know, that it was redirected at all.
Actually I saw a lot of implementations (example Symbian) where this is simple handled by HTTP API itself. On ME devices some implementations also do this.

But when you start with SSL Connections (https) this will fall back on you. Same for APN based connections where no proxy is inbetween.

But my code was prepared and checked for:
HttpConnection.HTTP_MOVED_PERM
and
HttpConnection.HTTP_MOVED_TEMP
which I knew for a long time where the redirect values (as integers these are 301 and 302).

But yesterday this code broke! Why? Because I got a different result: 307!
After some google I found out that the specification of HTTP 1.1 changed the default value for moved temporarily. They now called it "redirect temporarily" with the new value 307. The old moved 302 is not simply called "found".

But as always I just should have looked into the JavaDoc more closely, its already there:
HttpConnection.HTTP_TEMP_REDIRECT

So alway check for both: HTTP_MOVED_TEMP and HTTP_TEMP_REDIRECT!

see also http://developers.sun.com/mobility/reference/techart/design_guidelines/http_redirection.html

Dienstag, 5. Januar 2010

Google utilities

A happy new year!

it doesn't always has to be Apache/Jacarta libraries when you need some utilities.
Check out what google has to offer:
http://code.google.com/p/guava-libraries/
It's Apache licenced too and contains Googles new Collection Library 1.0

It's for Java5 only, therefore currently only mobile developers for Android can benefit of it