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
simon_hain
Posts: 15,947
Registered: ‎07-29-2008
My Device: Z10 LE
My Carrier: O2 Germany

Re: access and call a BB project from other BB project.

1) no, the manager is only used to launch another app, you need it only in the main application
2 )a global event will only be received when the application is running. just to be sure you understand the order of things
3) yes
4) launch uses the module name, no full path

what is the reason for having so many separate applications?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: access and call a BB project from other BB project.

These sentences unfortunately can have a variety of meanings:

 

"how can i access and call a project from other project"

"i would to link it with 8 separated applications"

 

You could mean a number of things including:

a) Invoke the other application independently

b) Extract data from the other application

c) Run code from the other application independently

d) Invoke code in the other application as a 'method call'

 

Please can you define how you want to use the 8 other applications from your one main application. 

 

You will also need to explain the 'state' of these other Applications.  Are they real and independent Applications?  Are they actually running and taking part in this?  Or they really just acting as Libraries?

 

Also you will need to describe how independent these Applications are.  For example, if the main Application is installed and you only have 6 of the 8 other applications, should the main application actually work?

 

Sorry to try to get this detailed information from you.  You see, almost anything is possible here if you try hard.  But we need to make sure we are trying hard to achieve the same objective as you are with the same restrictions.  Otherwise our solutions will not work for you. 

Please use plain text.
New Developer
manarS
Posts: 34
Registered: ‎03-12-2012
My Device: blackberry tourch
My Carrier: zain telecommunication compay

Re: access and call a BB project from other BB project.

peter and simon, thanx alot

 

from your replays i have discovered that i dont have real or acceptable reason to do this ..

its wrong and i walked in wrong path..

 

i have to work hard now to solve this big problem i am facing..

 

i will tell you more about my application i develop.

 

its a storyteller application, i have designed the main application as a UI, which contains menus, so once the user click it will take it to the story play screen,

 

story play screen i have took it from MediaPlayerDemo in blackberry blugin.. i have imported this demo, change alot of functions to display my setting, beacuse i dont want to display same setting in that demo. for example i removed ( last track, first track, prev track, and next track), thats means i change some functions.

 

offcourse now i have 2 applications one of them is main application which is the UI and the other is media player demo.

 

what i want to do now is to link them togather.

but i can't do this beacuse the simulator will be stuck and full with the applications beacuse all of these applications will be shown in the simulator. so thats why i walked in bad path. now i want to solve this and i dont know and i dont have any idea how to solve it but i think i can solve this by inserting the (media player demo) package to ( main application ) package. so from that i can communicate between main and media player so that will let me to open any page in main application when i am in media player and vice versa..

 

 

i think this solution is much better for me.

i cant submit my applications in current satution beacuse its 100% wrong..

 

do you have any kind of help ? is that solution using packages is good for my appliction or its also bad?

 

OMG, i have only 5 days to submit it :'(

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: access and call a BB project from other BB project.

Sorry I am still not clear on how you 8 media applications (the Stories I presume) relate to the main application.

 

Just guessing, I think you have two possible approaches.

 

1) Package up the UI and the Story together, so that youhave a completely separate applicatin for each story.  You need to be very careful here that there is nothing that is shared and persistent becuase that will not work.  But other than that, you can use the same UI package and classes in both applciations.

 

if you were doing this for App World, you woudl sell each story as a separate application.  The user would see each story as a separate icon. 

 

2) Create a main UI application and design a way to download each Story as content.  In this way the story would be content and on App World you would probably give away the story teller applciation and charge people for the content.  In this way the user would start the Story teller applicatin and then see what stories they had.

 

Is either of these what you want to do?

 

If not, can you explain how you want this to work from a user perspective. 

Please use plain text.
New Developer
manarS
Posts: 34
Registered: ‎03-12-2012
My Device: blackberry tourch
My Carrier: zain telecommunication compay

Re: access and call a BB project from other BB project.

[ Edited ]

oh, not that what i need.

try to forget what i said about 8 applications, now i have 8 packages and i would to link them togather to the main package ===> all of these packages will be in one application only\

this is what i am looking for now.. beacuse that idea is very bad,  i dont want to use it.

i want my application play stories ( play audio files) only.

 

i would like to let these audio files ( stories) in source folder in blackberry project application.

 

and i can call or access them once i click on button.

 

i will show you similer application. but the developer made this application interact with youtube. so this application will not work without accessing internet or network. this application is children's storeis.

 

munch_2012_05_08_152628.png

 

is it clear now?

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: access and call a BB project from other BB project.

It seems to me this is one Application, with a Selection method that selects whichever 'story' is going to be played.  It has a whole load of story resources, but these are not separate applications, they are just separate data files. 

Please use plain text.
New Developer
manarS
Posts: 34
Registered: ‎03-12-2012
My Device: blackberry tourch
My Carrier: zain telecommunication compay

Re: access and call a BB project from other BB project.

exactly, and i have made a big mistake by seperating the stories into parts..

now i have 8 stories and 8 media players each one in seperated application

i would like to group them togather into 1 application and i dont know how can i do this

 

do you have any kind of help?

i tried to add thier packages in the main package but i found an error in .jar file.

 

all of them have same classes name and i can't change thier name beacuse some of the methods related to each other and changing name will be a problem diffecult to solve.

 

what do you think? do you have anything in your mind, any good solution, dear?

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: access and call a BB project from other BB project.

You can not add jars with the same package names.

 

The only option I think you have, if you really have to have separate projects for each, is to refactor each of the packages.  I don't use Eclipse, but I think the refactoring options in Eclipse will cope with that.  So basically have classes that are specific to the story.

 

But I would argue that your actually have the same project repeated 8 times with slight variations.  So rather than cut and pasting the same class, then changing the names to suit the story, you should I think look to create a general class (or classes) and pass in the story specific information to that class.  Unless you have good reason to do it another way, I think most people would recommend this approach. 

 

The other issue you might have is the size of the resultant file.  I assume your sound files are quite big, so the complete package might exceed the limits for BB applications (8M).  If this is the case, then you really need to look at moving your resources to the SD Card.  There are options for doing that.  Let us know if you need to explore them. 

Please use plain text.
New Developer
manarS
Posts: 34
Registered: ‎03-12-2012
My Device: blackberry tourch
My Carrier: zain telecommunication compay

Re: access and call a BB project from other BB project.

first of all, thanks for the replay..

seocndly,

 

the packages name are different for example, i have package called:

com.rim.samples.device.ui

other package called:

com.rim.tests

 

and yes, each i have attached all classes names with the story as you recommended..

so the first media story called: MediaPlayerLemonJuice, the second one: MediaPlayerRidingHood...

 

the think i have only one solution which is : let add all packages togather and then access them , same us this topic : http://supportforums.blackberry.com/t5/Java-Development/Add-reference-to-another-project/m-p/248378#...

 

i would like to do the same, but as i said i am using jre7 .. i dont know how can i do that..

i prefer to do like this, actually

 

by the way, all files i have, the size is between KB and MB, all duration time for stories is less than 7 minutes..

they are short stories...

 

 

now, what is your advice to me...

 

waiting..

 

Please use plain text.
Developer
peter_strange
Posts: 19,601
Registered: ‎07-14-2008
My Device: Not Specified

Re: access and call a BB project from other BB project.

Can you add all the packages to the one workspace so that you work on all of them at the same time and they generate 1 single cod together?

 

Remember that the total size must be less than 8M. 

Please use plain text.