Blackberry ads on J2me GameCanvas - blackberry

I want to add blackberry ads on my GameCanvas. But we can only show the Blackberry ads on Blackberry MainScreen. Is there any way to show the ads on GameCanvas?

If Banner class is not final (I don't have API docs) I think you can try in this way:
Create banner field object and resize it for your particular frame
Create RIM graphics with corresponded size Bitmap
Every Canvas repaint call paint of Banner field (it's protected so you need to extend Banner)
Draw Bitmap pixel on your canvas particular frame
It's just idea. There could be other hidden required calls like simulate adding field to screen, call setVisible, etc. And I'm 90% sure that Banner is final.
So it's 90% impossible I think :)

Related

IOS lock screen custom text

In IOS 7 when the user has snoozed an alarm, the lock screen shows a count down in the form of mm:ss. I am wondering if this is a private function that only apple apps can utilize or of it is possible to display any custom text on the lock screen. Code is preferred, but a link to the api will be accepted (assuming it is possible).
Yes, there is. It is not possible for you to change something on lock screen.

Blackberry MainScreen Transitions

While writing my first Blackberry application using Java, I am confused between inheriting from MainScreen and Screen classes.
My initial understanding was that there should be just a single MainScreen-derived class in an application, since we would like to define the screen title and other embellishments only once. All the rest of the screens (which are invoked on top of the MainScreen) should derive from Screen.
However, this doesn't seem to be true as I have not been able to get a screen completely cover the non-title area of the previous MainScreen.
Is there anything specific which I have overlooked in understanding how multiple screens in a Blackberry application should be created?
Maybe you are confused with classes names MainScreen and Screen. Basically MainScreen extends Screen and adds additional functionality like Menu management, title field, status field and has already VerticalManager on it. If you don't need this functionality, like you have your own better menu functionality, or you need all area for custom draw logic or something else. You have ability to extend Screen class otherwise I suggest you to use MainScreen for every screen in your app.
Have you read this on BlackBerry's developer site?
And also this?
I do often have one and only one MainScreen in my application. Other screens can derive from Screen or FullScreen. Whether or not you need every screen to be a MainScreen depends on whether your UI design requires things like the header (title) and footer (status) in each screen, which MainScreen provides.
Are you saying that you're adding other screens, and they simply aren't taking up enough space? If you want additional screens to occupy the full screen, I would subclass FullScreen, not just Screen.
And, you're showing new screens (after the initial MainScreen) with UiApplication.pushScreen() and UiApplication.popScreen()?

how to Make small ticker screen Blackberry

I want to customize very first MainScreen of my Blackberry application as like small ticker screen. My aim is that the first MainScreen should be of size 320width,100height so when user launches the application then he will just see screen of size 320width and 100height (0,200,320,100) while remaining screen will be transparent and user will see other applications through transparent screen.
The best you could do is take a screenshot with your app backgrounded, to capture what would be underneath. Then draw the 320x100 UI on top of that screenshot. This has the visual effect you want, but if the underlying screens try to draw any update, that update will not be reflected in your UI.

Animation on top of MapField in Blackberry

I am using blackberry maps to write my Application and want to show current location of the user on the map using a Blue dot image. I am able to do it by overriding the paint() method of the MapField and place the image at the right place.
However now I want to pulsate(breathing bubble) the image, for that I am using a gif image with 3 different frames. Here i am not sure how to display all the 3 frames at certain frame rate so that I don't have to rely upon mapfield.paint() to draw my images. Initially I thought of using AnimatedGifField's thread for this, but not sure how to using it coz i can't add a field(AnimatedGifField) to a field(MapField). I am using JDE 6.0
Does anyone has any idea about it..?
I would probably just keep using the paint() method, but when you need to redraw the bubble, invalidate a region instead of invalidating the entire screen. This will allow you to continue using the paint method without needing to have the entire thing redraw itself.

How to flip a UI component when doing BlackBerry Java development?

I'm looking into porting my iPhone application to the BlackBerry and have run into a wall with the out of the box UI components and UI animations available for the BlackBerry. One feature that I really, really need to figure out is how do I flip over a UI component on the BlackBerry. For example, lets say that I have a UI component for a playing card. When the user selects that card I would like to flip it over to reveal what's on the other side.
Also, can anyone point me to any resources (books, websites, etc.) that deal with animation on BlackBerry devices?
Thanks.
You can achive effect in two ways:
BitmapField layout animation with image switch in the middle
BitmapField (or any custom field with image) image animation with image switch in the middle
See animation related articles:
BB KB - How To Display an animated GIF
The BlackBerry Graphical User Interface: Part 2 - Direct Screen Drawing
SO - Blackberry - fields layout animation
SO - Blackberry - background image/animation RIM OS 4.5.0

Resources