How to add new markers with video files to android app?

0 votes
asked Dec 26, 2018 by andshw (270 points)

I try to add new markers images and videos, that are starting when camera is pointing at a specific target.

I edit targets.json file, and post there one more image:

{
  "image" : "test1.jpg",
  "name" : "test1"
},

Then I added HelloAR.java class:

1. Method initGL- added size of ArrayList <VideoRenderer> from 3 to 4.

2. Method render - added one "else if" for new target image and video

if (target_name.equals("test1") && video_renderers.get(3).texId() != 0) {
    video = new ARVideo();
    video.openVideoFile("test1video.mp4", video_renderers.get(3).texId());
    current_video_renderer = video_renderers.get(3);
 Then I added files: test1.jpg and test1video.mp4 to resourses/

And nothing happens when I compleate the app and pointing camera to test1.jpg image.

1 Answer

0 votes
answered Dec 26, 2018 by zhnagjian (11,130 points)
Hello,

In your code, there is no path, I hope that you can refer to the code in Sample.

Thank you!
Welcome to EasyAR SDK Q&A, where you can ask questions and receive answers from other members of the community.
...