-2

The question is simple. I know how to invoke the Android built in photo interface to take the photo and store it in the BMP.

My question is, can you take a photo directly, bypassing the interface? My goal is to take a photo and do a preview on the form inside application. This way I have more control and more uniform aproach across different Android devices.

EDIT:

I found out you need JCamera JNI for that and Delphi already had a TJCamera class that implements that interface. However I can't find any example using it. Anyone has anything on that?

EDIT 2:

Here is the code on how to do it in JAVA. I need to know if there is a way to port this to Delphi:

Here is the JAVA code

So far I have not tried to port anything to Delphi yet.

Community
  • 1
  • 1
Runner
  • 6,073
  • 26
  • 38
  • Why the negative vote. I think the question is clear and straightforward. – Runner Jan 23 '16 at 15:12
  • If you vote negative at least explain what is wrong with the question. I can't see the problem. Splendid comunity we are having. – Runner Jan 24 '16 at 10:46
  • I didn't down vote, but those are probably because questions like this are considered too broad and not appropriate for SO. You will have more success getting answer in [Delphi iOS & Android Developers G+ community](https://plus.google.com/communities/107332833200594894879) or in official forums. – Dalija Prasnikar Jan 24 '16 at 13:13
  • 1
    To broad how? Its a simple and specific question. How is wanting to take the photo directly without android build in interface broad? If you google you will see there are solutions to this, I even posted the correct starting point in the edit of the question. There is nothing broad to it there is only one way to do it and there is specific code to do it. All I need is help on using JNI in Delphi for this specific task. I was not active on SO for one year, but if this is what it has become I don't mind missing it at all. – Runner Jan 24 '16 at 14:16
  • Btw, if someone needed more info all he/she needed to do was add a coment and I would update the question. But its easier to just click the button it seems. – Runner Jan 24 '16 at 14:23
  • I am afraid that without some actual code of what you have tried, you would not achieved too much. – Dalija Prasnikar Jan 24 '16 at 14:27
  • Ok, added a link to the JAVA code that does what I want. – Runner Jan 24 '16 at 14:44
  • Buy the Delphi Camera component for Android from [Winsoft.sk](https://www.winsoft.sk/acamera.htm) – Freddie Bell Mar 21 '18 at 17:06

1 Answers1

2

You can use for this purpose the standard action related with camera, that come with Delphi. To take a photo select in "Standard Action/Media Library" the action TTakePhotoFromCameraAction.

enter image description here

When the capture Finish you can use the event OnDidFinishTaking to do something.

Regards.