Log in or register to post comments

Calling Activity after target image found and disable texture over target image

April 25, 2013 - 8:55am #1

Hi,

I create one application that display video automatically after target image found by using Vuforio.(https://developer.vuforia.com/resources/sample-apps/video-playback-sample-app)

1 - While coding application,I use sample project codes and couldnt find how to remove creating texture over target images(play.png and black screen etc.) Can you help me about that ? Is there any variable to decline creating texture over target images ?

2 - When target image found,video plays automatically.its work right now.But after video finish,i want display image to share pictures or videos at social medias (facebook-twitter etc) How can i call new activity to have that interface ? How can i check video finish or not ?

Thanks

 

Calling Activity after target image found and disable texture ov

April 29, 2013 - 9:26am #8

Great. Glad to help!

Calling Activity after target image found and disable texture ov

April 29, 2013 - 9:15am #7

Thanks AlessandroB,

Your answers lead me to solve problems.

Best Regards

Calling Activity after target image found and disable texture ov

April 26, 2013 - 9:07am #6

Ok, then you need to implement the OnCOmpletionListener in the FullscreenPlyaback class

Calling Activity after target image found and disable texture ov

April 26, 2013 - 8:56am #5

at fullscreen

Calling Activity after target image found and disable texture ov

April 26, 2013 - 6:11am #4

Hi, is your video playing on texture or in fullscreen ?

 

Calling Activity after target image found and disable texture ov

April 26, 2013 - 4:57am #3

Hello,

First of all thanks for quick reply.I solved first question with your direction.But second one even i try to call one other activity.Its not present after video finish even i implement onCompletionListener as you told.Code is below:

VideoPlayerHelper.java

 

mMediaPlayer.setOnCompletionListener(new OnCompletionListener() {
                             public void onCompletion(MediaPlayer mp) {
                             DebugLog.LOGE("VIDEO FINISHED ");
                             Intent intent = new Intent(mParentActivity, ShareActivity.class);
                             mParentActivity.startActivity(intent);
                        }
  }
Best Regards

 

 

 

Calling Activity after target image found and disable texture ov

April 25, 2013 - 12:40pm #2

Hi,

for question 1, you need to play with the code in VideoPlayback.cpp, in the renderFrame() function;

in particular, check this line and the subsequent code (this is where the play icon is rendered):


        if ((currentStatus[currentTarget] == READY)  || (currentStatus[currentTarget] == REACHED_END) ||
            (currentStatus[currentTarget] == PAUSED) || (currentStatus[currentTarget] == NOT_READY)   ||
            (currentStatus[currentTarget] == ERROR))

 

For question 2, you can implement the OnCompletionListener interface in order to know when the video is finished, see as an example the VideoPlayerHelper.java class.

 

Log in or register to post comments