Dealing with large Blackberry applications (lots of pictures) - blackberry

I have a blackberry application with lots of images that was build for pre-OS7 handsets. I have to make it up to date with the new screen sizes, and my 5Mb app will be almost twice as big, which means over the limit for it to work.
What is the best way to handle that in the BB Java Plug-in for Eclipse ?
I've come to the conclusion that i have 2 choices :
Including the new images as a cod (or is it jar?) library in my current project, but didn't manage to do that. Most of what i read was for the JDE anyway and i'd like to do that in Eclipse.
Have a second Bundle for new handsets, but how to do that without having 2 different projects ?
Downloading the new images on install seems to be another one, but it's not an option for this project.
Details and/or links appreciated, as i'm quite new to BB development.
Many thanks

From my point of view the better way is to use only the biggest possible images in the project and scale them down proportionally for every device at the runtime.
When you scale down an image its quality {almost} does not change. There are exceptions, sure. But in general this rule works.
Also you may use preprocessor to build different cod files for different devices with different screens.

You can keep bigger images and get rid of smaller ones. You can handle devices that has lower resolution via image scaling. This way your application becomes smaller.

According to me i suggest you that you have to make same app for only Blackberry OS 7.0 because it has different different resolution and if you manager your application for all Blackberry OS than your app will become larger size and it may be possibilities that we cant upload our app in Blackberry app world.
Remove all previous OS graphic and put into for only Blackberry OS 7 and upload it on market so OS 7.0 user download the latest app.

Related

Building IDE for iPadOS 16 - Limitations?

I'm considering a side project of making a simple IDE that can compile and run code locally on the iPad. How possible is this?
Is there any iPadOS limitations that would prevent me to access the hardware on the iPad?
Can I fully utilize the M1 chip on the iPad Pro for large scale projects?
Would building a terminal along with the IDE be possible?
File management is a whole other thing I'm also concerned about.
There are applications like 'Pythonista' and 'Termius' that look like they are able to do this, but I wanted to ask how doable this is before I dedicate any time on it.
I would really appreciate any resource/information on this.

How to create and immediately be able to use spritefonts during runtime?

I'd like to know if it is possible to select a typeface, font size and be able to use it right away during runtime in an XNA application.
If it isn't possible using built-in runtime methods, maybe it's easier (or better, or faster) to do it using some automation software (like autoit) to create spritefont file in the background, and be able to use it afterwards in an XNA app without restarting the app?
I'm going to use this mainly on my own computer for testing and picking fonts, so I'm okay if it requires full VS installation along with XNA framework and any other stuff.
Easy put, it can be done, but you have to use WinForms, link to tutorial in order to load spritefonts. You could do it simpler, by making a couple of spritefonts before you do anything (or create spritefonts for every font you have and add them to the content). This is so, because of how XNA handles spritefonts. As you've seen, SpriteFonts are basically an xml file. This is not how the final binaries are. The final binaries are images containing every character in the font you selected at that size. That way, the gamer doesn't have to have the font installed in order to play your game, and therefore you can do some awesome stuff with fonts and the user can't use that font (unless he rips it).
I have not yet found a tutorial for winforms and spritefonts, but I suppose that the model version needs only a little modification for it to work with spritefonts.

Same Application on Different Blackberry Handsets

I am a newbie in Blackberry Development and has got stuck on a very complex thing.
I have to make an application which should be support all O.S 6 and 0.S 7 based mobile phones.
Now I have different screen resolutions for different handsets in BB OS 6 and 7.
Now how can i manage my background images, and its button positions to be synced on all size of devices.
I have created an images for the screen size of 640x480 and according to it I have placed some button on x,y positions. now if i install the same app on a screen size of 480x360 how can i manage the x,y positions and manage the background size according to device width and height.
Can anybody help? I am complete newbie.
Use preprocessor, built-in to Eclipse JDE-plugin, or third-party preprocessor and BlackBerry Ant Tools
Compile separate applications for different RIM OS versions using the same source code files with preprocessor directives inside.
Technically an application compiled with RIM SDK 6.0 is compatible with device with RIM OS 7.0, but to provide the best user experience make separate applications for separate RIM OS versions.
On preprocessing include those image files which are suitable for building a particular application version. If you need to support many screen sizes, then add the biggest possible images to your project and then scale them down at the runtime. Scaling down almost does not affect image quality.
Upon ant build process employ Alx task to collect all information about separate application versions into one alx file.
As a result you will have one alx file (application descriptor file, it is an xml-file), and a set of folders with cod files inside.
When all cod files are signed, you can also do it upon ant build process distribute this alx file with all folders with cod files as one zip archive.
Customer unzips this archive, connects device via usb to the computer, launches BlackBerry Desktop Manager and selects this one alx file. Directives generated by alx task will guide BlackBerry Desktop Manager to install application suitable for the device RIM OS version.
If you want to distribute your application wirelessly, then employ jadtool task and make a php page that reads browser user agent and redirects browser to a relevant jad file.
Before using OTA (over the air) method for distributing your application, add the following MIME-type instructions to the .htaccess file of your web-server.
AddType text/vnd.sun.j2me.app-descriptor jad
AddType application/java-archive jar
AddType application/vnd.rim.cod cod
While the approach suggested does provide the best user experience, it is also the most complex to manage.
Personally I try very hard to make one executable and have it evaluate at run time what it needs to do based on the form factor of the device. This is actually easier than you might think, helped significantly by the fact that most screens about the same width. So you can do things like scale your assets to match a proportion of the screen width, based on the screen resolution, and they will look OK on most devices.
And while there are some nice things to be had by using stuff that is specific to say OS7, at this stage I think you should focus on the bread and butter stuff that you can do with OS 5. So, I would recommend you develop something for OS 5.0 - it will run on OS 6.0 and OS 7.0 devices. Create the UI generically to cope with various screen sizes. Later, if you need to get more sophisticated, you can use the tools that have been described.
You will find more on how I try to do things by looking at this.
http://supportforums.blackberry.com/t5/Java-Development/Tutorials-for-new-developers-Part-1/m-p/1621711#M194036
I would suggest you look at tutorial 10.
I also recommend a cruise around here:
http://developer.blackberry.com/java/
One final thing though, are you aware that Java phones are no longer being developed by BlackBerry? If you are just starting development, you might consider learning C++/Cascades and developing for the BB10 phones.

Blackberry OS 7

I have an App. that was built for BB OS 6. Wanted to know if it will work on the new OS 7 without any glitches.
If not, can it be ported without re-doing the entire thing.
It will work but as the devices probably will have different resolutions maybe you will have to made some code changes so de fields adapt better to the screen even if the code behave dinamically.
You can see it if you try your app in the simulator.
It will work without making any changes, as Blackberry 7 has backward compatibility for the builds. You might get some regulations issues, if your program is coded to behave dynamically then no issues.
Also, You don't really need to build again. Just go ahead and install on Blackberry 7. It will work.

What do you need to do to create a single package for blackberry OS5 and OS6 devices?

A newb question and one I haven't been able to see much advice on, but is it possible to create a single package that will install and run on both blackberry OS5 and OS6 devices?
I want to avoid preprocessing or creation of two different COD files.
I am not using anything special that differs between the two OS's (afaik!)
Yes, absolutely. So far, RIM has made all of it's OS revisions backwards-compatible. So anything you write against any given OS version will work on that version and all newer versions.
That's not to say that you won't run into funny quirks when moving to newer OS versions, but your code will execute without recompilation. You just can't take advantage of any of the newer OS's API changes without doing preprocessing.
Basically in this case you just should not use APIs which were added in OS6.

Resources