04-21-2009 09:08 AM
How invoke Video Camera directly without pass through Camera?
Now using : Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments()) application starts with Camera and
user select Video Camera from menu.
Thank you in advance!
Solved! Go to Solution.
04-24-2009 10:48 AM
hello guys..
please let me know the workaround,
because i know few application, which are successfully doin this.
how can i invoke a video camera from my application.......
04-30-2009 04:40 PM
04-30-2009 05:39 PM
You'll find yourself really restricted though. The JDE 4.7 API doesn't allow you access to a lot of the functionality you'd want to, such as the video LED, none of the cool camera abilities, like zoom and focus (though you can probably fake the zoom by taking a higher resolution snapshot). Unfortunately, the snapshot also is always accompanied by a sound. I'm hoping these APIs will be open up soon as I have 3 apps in the sidelines waiting for this functionality.
BTW, for those with an interest, I've just found a lot of J2ME code under code.google.com. You can search for javaME there. There is a project called ZXing, for example, that has full 2D barcode processing and they support J2ME also, so you can take a photo, pass it to the library and it'll process the image to give you the barcode decoding. There are many other libraries too. Most are written for Android, but many have javaME versions too.
Thx
-D
05-11-2009 05:45 AM
05-11-2009 06:06 AM
05-11-2009 06:11 AM
Yes, everything stated is for 4.7 only to my knowledge.
Same with the limitations.
I think that the Storm is going to lose to the new Iphone unless they hurry up and come out with 4.8 with proper control of the camera as I'll bet the new Iphone will allow full access to their new camera which is as good if not better than the Storm's.
-D
05-11-2009 06:48 AM
05-11-2009 10:32 AM
No kidding. I went with the Storm so I could develop these apps and now I can't because the API isn't there. Couldn't believe it. I have to develop a different app instead.
-D
11-26-2009 06:37 AM
this is a complete solution to invoke camer in ur application
UiApplication.getUiApplication().addFileSystemJou
Invoke.invokeApplication(Invoke.APP_TYPE_CAMERA, new CameraArguments());
implement FileSystemJournalListener in your class
public void fileJournalChanged()
{
long lastUSN=0;
long USN = FileSystemJournal.getNextUSN();
for (long i = USN - 1; i >= lastUSN; --i)
{
FileSystemJournalEntry entry = FileSystemJournal.getEntry(i);
if (entry != null)
{
if (entry.getEvent() == FileSystemJournalEntry.FILE_ADDED || entry.getEvent() == FileSystemJournalEntry.FILE_CHANGED || entry.getEvent() == FileSystemJournalEntry.FILE_RENAMED)
{
if (entry.getPath().indexOf(".jpg") != -1)
{
lastUSN = USN;
imgpath=entry.getPath();
EventInjector.KeyEvent inject = new EventInjector.KeyEvent(EventInjector.KeyEvent.KEY_
inject.post();
inject.post();
getImage(imgpath);
/* UiApplication.getUiApplication().invokeLater(
new Runnable()
{
public void run()
{
getImage(imgpath);
}
}
);*/
break;
}
}
}
}
}
private void getImage(String url)
{
try {
FileConnection fconn = (FileConnection)Connector.open("file://"+url);
if (fconn.exists())
{
InputStream input = fconn.openInputStream();
byte[] data = new byte[(int)fconn.fileSize()];
input.read(data, 0, data.length);
Bitmap b = Bitmap.createBitmapFromBytes(data, 0, -1, 5);
label.setText("file exist");
if(b!=null)
{
// imgfield.setImage(b);
label.setText("secuss fully created"+url);
}
}
label.setText("");
fconn.delete();
fconn.close();
}
catch (Exception e)
{
label.setText(" file not fond"+e.toString()+url);
}
}
ennjoy yourself