Use your Android device’s camera for background activity

Since it was difficult for me to use the AndEngine augmented reality example. I thought of doing it my own way. I want to access my camera Android device and use it as a background in my activities. It still looks like augmented reality. I will add sprites later. What will be the code for JAVA and XML? Are there any changes to the manifest? THANKS!

+4
source share
2 answers

you need to use the camera background (tutorial here ) and place the sprites using some rendering library. I use Jpct-ae , which is very easy to integrate and has an excellent forum . and for a more extended reality effect, you can apply sensor values ​​for sprites here

+3
source

You will need to use the camera control API with what is called surfaceView in order to make the wat you need. Here are the resources to help you get started:

http://mobile.tutsplus.com/tutorials/android/android_augmented-reality/ http://www.devx.com/wireless/Article/42482 http://developer.android.com/training/camera/cameradirect.html http://developer.android.com/reference/android/view/SurfaceView.html

Good luck

+1
source

Source: https://habr.com/ru/post/1438158/


All Articles