"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

play native video on the ImageTarget like "stone"

Hi,I want to use the Android widget "VideoView" to play a Video on the Target, I found someone like me ask the question [HTML]https://ar.qualcomm.at/arforums/showthread.php?t=1096[/HTML] but i found he use the Intent to another activity to play the vedio. And i want to play it on the current activity ImageTargets.java. Here is my code snippet : First: ImageTargets.cpp [CODE] // call it with the trackable's name if (trackable->getId() != lastTrackableId) { jstring js = env->NewStringUTF(trackable->getName()); jclass javaClass = env->GetObjectClass(obj); jmethodID method = env->GetMethodID(javaClass, "VideoPlay", "(Ljava/lang/String;)V"); env->CallVoidMethod(obj, method, js); lastTrackableId = trackable->getId(); } [/CODE] Second: ImageTargetsRenderer.java I make a little change: public class ImageTargetsRenderer [COLOR=Red]extends Activity[/COLOR] implements GLSurfaceView.Renderer { ...... Here is my VideoPlayCode public void VideoPlay() { VideoView videoView = (VideoView)findViewById(R.id.videoView); videoView.setVideoPath("/sdcard/Channel2.mp4"); MediaController mc = new MediaController(this); videoView.setMediaController(mc); videoView.requestFocus(); videoView.start(); } } Third How should I call the VideoPlay() function ? protected void onResume() { super.onResume(); .............. } Please help me ... Regards

Thank you,Kim. I have a idea is that i create a playvideo function and create a VedioView in the ImageTargets.java and using you give us the example code ImageTargetsRenderer.java [CODE] // Called from native to display a message public void displayMessage(String text) { // We

Hi,Kim I have change my mind, i use the Toast and SurfaceView to finish that demo. When I play the Dominoes, this project give me a good idea. I hope everybody to look the example and the document carefully, it has more information to help us!