Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified

Building an app for storm

I currently have built an app that is compatable with all bb's except the storm. I want to incorporate the ability to touch screen as well as the rotation orientation of the app, is there any tutorials or anything to show how to make an existing app compatable with the storm?

 

Do I have to use 4.7 in order to do this? or is there a way to do it without 4.7

 

Thanks in advance

Developer
Posts: 1,807
Registered: ‎04-28-2009
My Device: Z10 (STL100-4)-10.3.2.858, Z10 (STL100-3)-10.3.1.2576, Z30 (STA100-5)-10.3.1.2582, Passport (SQW100-1)-10.3.1.2576, PlayBook (16GB)-2.1.0.1917
My Carrier: Verizon

Re: Building an app for storm

You need 4.7 to compile it but you can use preprocessor defines to isolate all 4.7 and higher code. The touch function for fields is:

protected boolean touchEvent(TouchEvent message)

 

and the rotation is:

Ui.getUiEngineInstance().setAcceptableDirections(int);

 

You isolate those pieces of code and compile it with 4.7/5.0 and it should work fine.

---Spends time in #blackberrydev on freenode (IRC)----
Three simple rules:
1. Please use the search bar before making new posts.
2. "Like" posts that you find helpful.
3. If a solution has been found for your post, mark it as solved.
--I code too much. Well, too bad.
Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Building an app for storm

If your application doesn't use any fixed size graphics or custom painting to the screen, it should work for the Storm pretty well.

 

The key to making it work on all devices is to keep controls as standard as possible.

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified

Re: Building an app for storm

How do you use the preprocessor to isolate pieces of code?

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Building an app for storm

What are you using to develop your application?

 

JDE or Eclipse with Java Plugin?

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified

Re: Building an app for storm

I am using the JDE. Any articles/readings/samples on how to use pre processor ? Thanks a lot Smiley Happy

Developer
Posts: 33
Registered: ‎05-08-2009
My Device: Not Specified

Re: Building an app for storm

Hi,

 

OS would take care of things by default. Just try compiling once in 4.7. It should work fine. Thanks

Developer
Posts: 73
Registered: ‎07-16-2009
My Device: Bold

Re: Building an app for storm

Yes, you need at least 4.7.

 

Also you need to read Transitioning to Touch Screen Development.

 

Greetings

Developer
Posts: 1,055
Registered: ‎01-25-2009
My Device: BlackBerry Bold 9650/BlackBerry Torch 9800

Re: Building an app for storm

 


IK828 wrote:

I am using the JDE. Any articles/readings/samples on how to use pre processor ? Thanks a lot Smiley Happy


 

Here is an example of how to use the preprocessor:

 

http://supportforums.blackberry.com/t5/Java-Development/Preprocessor-Directives-for-JDE/m-p/71951/hi...

Jerome Carty - Follow jcarty on Twitter@jcarty | #webworks-dev / #BlackberryDev on irc.freenode.net | My Apps
Click "Accept as Solution" if post solved your original issue.. Give like/thumbs up if you feel post is helpful
Highlighted
Developer
Posts: 132
Registered: ‎11-20-2009
My Device: Not Specified

Re: Building an app for storm

rcmaniac - I need to compile with 4.7/5.0 however I want my app to run on OS > 4.5?  Is there anyway to have the application run > 4.5 with having specific code for 4.7/5.0 storms?

 

It seems like when I take the approach you suggested, and compile in 4.5 JDE the compiler will complain about importing the touch classes and if I compile in 4.7 JDE and run the app on a 4.5 OS simulator/device it throws an exception about HomeScreen not found (which is simply an issue of building it forward compatable not backwards).

 

Am I just doing it all wrong or is this even possible?