多个标记可跟踪增强现实Android应用程序

时间:2022-05-23 21:17:14

I am using qualcomm sdk for creating augmented reality on android phones. I am able to use the ImageTargets sample application to check the trackable and then initiate an intent to call another activity when that marker comes in screen. I figured out that when the marker is sensed by the QCAR sdk then the control is in on resume. So then i navigate the user to another activity.

我正在使用qualcomm sdk在Android手机上创建增强现实。我可以使用ImageTargets示例应用程序来检查可跟踪的内容,然后在该标记进入屏幕时启动调用另一个活动的意图。我发现当QCAR sdk感知到标记时,控件处于恢复状态。那么我将用户导航到另一个活动。

My problem is that i have 5 markers and in onResume or any place i must have a switch case to get the ID of the markers in order to do different tasks on different markers.

我的问题是我有5个标记,在onResume或任何地方我必须有一个开关案例来获取标记的ID,以便在不同的标记上执行不同的任务。

Thanks

谢谢

1 个解决方案

#1


0  

The Trackable object in ImageTargets.cpp has a method getName(), so you can call trackable->getName() to get the name of the current marker and return it to your Java code for further use.

ImageTargets.cpp中的Trackable对象有一个方法getName(),因此您可以调用trackable-> getName()来获取当前标记的名称,并将其返回到Java代码以供进一步使用。

#1


0  

The Trackable object in ImageTargets.cpp has a method getName(), so you can call trackable->getName() to get the name of the current marker and return it to your Java code for further use.

ImageTargets.cpp中的Trackable对象有一个方法getName(),因此您可以调用trackable-> getName()来获取当前标记的名称,并将其返回到Java代码以供进一步使用。