BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-30-2008, 08:00 AM   #1
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Question Access Camera

Please Login to Remove!

Hi everyone,

I'm a French student doing a placement.

I work on a BB 8310.

I have to make some applications.

For one of them I hava to launch the camera , take a picture and make other process before the end.

I know how to launch the camera with :

Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());

But the camera stay on the screen and allow to take as many pictures as I want. And when I press escape I have the other process processing.

I know that I have to lose control after the invoke.

"Note: Calling Invoke.invokeApplication(int, ApplicationArguments) results in a process context switch. When
the BlackBerry application is started, your application loses control. When the started application session ends, context
might not return to your application."

My question is how can I take the hand after the first picture and how can I recover this picture.

Thanks

Last edited by goulamass; 01-30-2008 at 08:11 AM..
Offline  
Old 01-30-2008, 08:26 AM   #2
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

i think this answers your question:

Disclaimer

there are already lots of threads about this - use the search function
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 01-30-2008, 08:32 AM   #3
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Sorry I didn't see that is the same forum.
Offline  
Old 01-30-2008, 08:49 AM   #4
jfisher
CrackBerry Addict
 
Join Date: Jun 2005
Location: Manchester, UK
Model: BOLD
Carrier: t-mobile
Posts: 714
Default

it's not but they're pretty much the only two for dev help. answering your query would only reiterate what's already been covered before.

and hello!
__________________
new job doesn't allow a public profile - please do not contact this user with questions, you will not get a response. good luck!
Offline  
Old 01-30-2008, 08:59 AM   #5
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

I know.

But as I want answers , I try to have a maximun of contacts.

If I obtains an answers or if I do it by myself , should I post it on the both forums or only on one of them??
Offline  
Old 01-30-2008, 11:42 AM   #6
simon.hain
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Default

it would be polite to post a solution to an open question in the other forum as there is no follow-up on crossposting.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 01-31-2008, 07:44 AM   #7
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

I have no answer on the other forum.

Anyone here have an idea???
Offline  
Old 01-31-2008, 09:50 AM   #8
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Question

In fact I will let users to take a picture and press return after.

But now I try to access the last picture taken and I search a lot and I don't find how I can access the multimedia repertory.

I find this :

RIM Device Java Library

But even if I learn a lot of intersting things I don't find method to access multimedia.

I just want a clue.

Thanks
Offline  
Old 01-31-2008, 10:01 AM   #9
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Perhaps I find a solution.

What do you think about using "Class FileSystemJournalEntry" and take the path to recover the picture???

I will try this.

If anyone have an another idea or just think that I'm wrong , tell me.

If I will be right and if it'll work I will tell you.
Offline  
Old 01-31-2008, 12:03 PM   #10
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

All right.
Offline  
Old 01-31-2008, 12:05 PM   #11
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Sorry for the spam with just all right.

I click on the wrong button.

So I do what I want.

I have to correct my code and I will post you some parts to allow you to understand what I did and why it's work.
Offline  
Old 02-15-2008, 11:57 AM   #12
BBDude75
New Member
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: t-mobile
Posts: 2
Default Invoke

Were you able to resolve the issue?
Getting the control back to your application after invoking the camera application.
Offline  
Old 02-18-2008, 03:05 AM   #13
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Not yet as I answered your pm.

First I have to work on a web service for an another application.

As soon I finish I will work again on it.

If you find before me thanks to tell us the solution
Offline  
Old 02-18-2008, 05:08 AM   #14
jhaehnle
New Member
 
Join Date: Nov 2007
Model: 8310
PIN: N/A
Carrier: vodafone
Posts: 7
Default

Hi,

im working on the same stuff....
Probelm for me is to close the cam app after taking a picture...
Tried to use EventInjector Class but resulted in null pointer exception.
Device is enterprise activated....

Are there any other clues to solve the camera app closing problem?

Best regards,
Jochen
Offline  
Old 02-21-2008, 03:52 AM   #15
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

I don't find yet the solution that we want.

I will try a lot of things today.

I tell you if I find
Offline  
Old 02-22-2008, 08:35 AM   #16
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Does someone find a solution???
Offline  
Old 03-03-2008, 10:23 AM   #17
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

All rights.

I find a solution.

If you have any question ask me.

In fact I just add it :

// Try to kill camera app here by injecting esc.
EventInjector.KeyEvent inject =new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_ DOWN,Characters.ESCAPE,0,50);
inject.post();
inject.post();
Offline  
Old 06-27-2008, 02:53 PM   #18
netomarin
New Member
 
Join Date: Jun 2008
Model: 8310
PIN: N/A
Carrier: Tim
Posts: 1
Thumbs down

Hi all,

After reading this post, I've created a midlet with this Invoke to use camera
And, when the user press the softkey Camera I execute the follow code:

Code:
if ( c.equals(cmdCamera)) {
    //invoking camera
    Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());
    // Try to kill camera app here by injecting esc.
    EventInjector.KeyEvent inject = new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_DOWN,Characters.ESCAPE,0,50);
    inject.post();
    inject.post();
}
But, when I tried on emulador I got a Runtime Error. Does anyone have any idea?

Thanks
Neto Marin
Offline  
Old 06-30-2008, 03:33 AM   #19
goulamass
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Default

Hum it's not the way to do this.

You have to setup a fileJournalEntry.

I think that this will help you:

Code:
if ( c.equals(cmdCamera)) {
    //invoking camera
    Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());

for ( long i = USN ; i >=0 ; i--)
{
    FileSystemJournalEntry entry = FileSystemJournal.getEntry(i);

    if (entry.getEvent() == FileSystemJournalEntry.FILE_ADDED || entry.getEvent() == FileSystemJournalEntry.FILE_CHANGED || entry.getEvent() == FileSystemJournalEntry.FILE_RENAMED)
    {
        addr = entry.getPath();

        if (addr.indexOf(".jpg") != -1)
       {
           // Try to kill camera app here by injecting esc.
          EventInjector.KeyEvent inject = new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_DOWN,Characters.ESCAPE, , 50);
         inject.post();
         inject.post();
     }
   }

   if (entry == null)
   {
     // we didn't find an entry.
     break;
   }
}
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


AVR EA16 Automatic Voltage Regulator Compatible With KUTAI Generator GENSET picture

AVR EA16 Automatic Voltage Regulator Compatible With KUTAI Generator GENSET

$99.90



Phoenix Contact Voltage Distribution Block Part No. 2315269 picture

Phoenix Contact Voltage Distribution Block Part No. 2315269

$30.00



BYSTRONIC VOLTAGE MODULE VM 50A 300V POWER SUPPLY 700024 picture

BYSTRONIC VOLTAGE MODULE VM 50A 300V POWER SUPPLY 700024

$2499.95



GEYA Over Under Voltage Monitoring Relay AC/DC110-240V Voltage Protection Device picture

GEYA Over Under Voltage Monitoring Relay AC/DC110-240V Voltage Protection Device

$16.99



Renogy 500A Battery Monitor High and Low Voltage Programmable Alarm 500A Shunt picture

Renogy 500A Battery Monitor High and Low Voltage Programmable Alarm 500A Shunt

$70.99



USB Type-C Meter Tester Digital Multimeter Current Voltage Power Detector +Cable picture

USB Type-C Meter Tester Digital Multimeter Current Voltage Power Detector +Cable

$19.98







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