BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 04-23-2010, 04:15 AM   #1
eye776
New Member
 
Join Date: Aug 2009
Model: 8120
PIN: N/A
Carrier: at&t
Posts: 3
Default Adding resources after signing

Please Login to Remove!

Hello!

I was asked (more like forced) by my boss to submit generic, signed BlackBerry builds (with all of the features present in the code), but he wants to be able to control which features are enabled by using custom properties in a configuration file.

I would like to ask a question:
Is there ANY way that a resource (text file) can be bundled with a cod file AFTER having signed the included .cod files (another cod containig the data?) , in such a manner, that it can opened and read from within the application?

PS:
Reading from the .jad is out of the question as they have multiple distribution channels (.jad & .cods, .alx & .cod, etc.).

I've tried creating an empty project with the text file in it (compiled as a module) but there doesn't seem to be a method for reading files from inside other modules.
Offline  
Old 04-23-2010, 06:43 AM   #2
eye776
New Member
 
Join Date: Aug 2009
Model: 8120
PIN: N/A
Carrier: at&t
Posts: 3
Default

Okay, let me rephrase this:
I'm not trying to do anything illegal. I'm simply trying to load a text file (containing configuration options) from a DIFFERENT cod file than the one from my project.

I already tried
Code:
String filename = new String("cod://appNameres/appconfig.cfg");
InputStream is = file.getClass().getResourceAsStream(file);
and it doesn't work. Where the resource cod is "appNameres.cod"

I saw some pointers on using a class to do this but HOW can I call on a class in a different cod file?

For example:
Code:
class ResLoader
{
  public static InputStream loadResource(String filename)
  {
    InputStream is = file.getClass().getResourceAsStream(filename);
    return is;
  }
}
I'm a noob in terms of RIM BB API (i did use J2ME for quite a while).
Offline  
Old 04-24-2010, 07:27 AM   #3
eye776
New Member
 
Join Date: Aug 2009
Model: 8120
PIN: N/A
Carrier: at&t
Posts: 3
Default

I finally managed to do it by creating a library that reads out of the resource cod. I placed the library in the classpath on compilation, and then on the rapc task. I also installed the resource cod at the same time as the application.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter picture

LCD Digital Multimeter Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meter

$9.95



DC 100A 100V Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt picture

DC 100A 100V Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt

$12.99



US Stock Analog Panel AMP Current Ammeter Meter Gauge DH-670 0-10A DC picture

US Stock Analog Panel AMP Current Ammeter Meter Gauge DH-670 0-10A DC

$13.23



DC 100V 100A Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt picture

DC 100V 100A Voltmeter Ammeter Volt Amp Meter Voltage Current Tester with Shunt

$12.89



US Stock DC -100A ~ +100A Analog AMP Current Needle Panel Meter Ammeter & Shunt picture

US Stock DC -100A ~ +100A Analog AMP Current Needle Panel Meter Ammeter & Shunt

$21.33



LCD Digital MULTIMETER Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meters picture

LCD Digital MULTIMETER Voltmeter Ammeter Ohmmeter Volt AC DC Tester Leads Meters

$9.95







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.