I am new to this great community of developers, and am writing on behalf of our team here, who is struggling to get a client's "advertisement" code (injected into a J2me game at the start of the game) run on various devices properly.
The normal "adv code" flow in the wrapped/ Ad-injected J2ME games is as follows:-
When the "Wrapped" Game loads on Device, it
1. Prompts the User to confirm access to an "Untrusted" Application, then - we say "Yes"...
2. Prompts the User to confirm (YES/ NO) on the "This game requires data connection. Do you want to enable it?" Screen [--> "Yes" would do a client Ad Server Call; "No" would call the real Game directly], -- we say "Yes"...
3. The above Http Get call returns an XML in response, which is parsed for a few critical elements.
4. The Ad Image (GIF/ PNG/ JPG) is fetched from Ad Server after taking the Image URL from the above XML Response via another Http Get call.
5. Gifdecoder.java is used to enable display for devices that do not natively support GIF.
6. During the Steps (3), (4), and (5) [last one if applicable) --> the User sees ""Please wait while Game is loading..." on the Device Screen.
7. The Ad Image is seen with 2 soft-buttons at the bottom :: "Go To Ad" and "Launch Game", and set to sleep for 5 sec while waiting for User Action on these 2 buttons Or PointerRelease Or KeyRelease.
8. Clicking on "Launch Game" shows up a new screen called "Connect Screen" with a few more buttons (CustomItems).
On a Nokia E71 and different Emulators -- We DO see the entire flow above working fine, including launching the real game from the subsequent "Connect Screen" buttons. All Good.
On a Nokia 6300 -- User sees ""Please wait while Game is loading..." on the Device Screen. But now, instead of displaying the first Adv Image for User Action (with 5-sec sleep) -- it does NOT even show the Adv Image, and directly moves on to the 2nd "Connect Screen" -- that too within just 2-3 seconds --
And then, user sees a java/lang/NullPointer exception on screen, without any user input. It happens within another 1-2 seconds -- while "vanishing" the Connect Screen.
We are unable to simulate the same error on our Nokia Device Emulators or on the NetBeans emulator. But, we need to know WHY the behavior of Nokia 6300 is so very different, and HOW we can tackle this in our "Ad-Processing" Code.
Note that the same games that were wrapped/ injected with ouradv- code, were running fine on both 6300 and E71 when "unwrapped".
So, the real ISSUE, as I see it, somehow, does lie in our code.
Do let us know as to WHAT could be the root cause.
All help on making this run on different kinds of devices would be greatly appreciated -- with Nokia 6300 being the biggest concern for us now.