Hello, everyone. I hope you're all enjoying your holidays.
My team is considering using an image from the mobile device's camera as part of gameplay. It seems the Android NDK doesn't support the camera, yet, and the best way to do it is from Java code.
The solution I was considering is the game's main menu and camera interface would be a standard Android Activity written in Java. After all that was done and the player entered the game, load the NVEventQueueActivity for the Orx code.
Wondering what everyone thinks of this solution and if anyone has done something similar?
Any documentation that would be helpful in understanding the Orx Android source? I found this already: Android NVIDIA samples
I'm afraid I have close to no idea how things work on the Android side, but I'm sure Lydesik or Faistoiplaisir will provide you with valuable insights whenever they have the opportunity.
If I understand corectly, you would like to be able to use a camera capture image inside your game (as a texture for an object)
This is how I would do it
1) An activity which allow you to take the picture using the phone's camera. This activity would save the image in file in the Internal Storage. By default, i think the image will be saved on the SD card in the Camera folder, so you will have to copy this file. The filename of the picture needs to be static (for capture.jpg), because this file name will be used in orx to load the texture and currently there is no way to pass arguments to the orx activity.
2) fire an Intent to start the OrxActivity with a simple startActivity()
3) in orx config file use Texture = capture.jpg to reference the picture took previously. ( When accesing files orx try first to find the file in the Internal Storage, if not found it tries in the apk assets folder. Of course files for writing are always opened in the Internal Storage.)
hope that helped