function generate()?{ ? document.location = "architectsdk://TrackerDidDiscoveredImageTarget?id="+1; ?}?
But I want this, which is not working trackable2DObject = new AR.Trackable2DObject(logoTracker, "Bunglow", { drawables: { cam: },onEnterFieldOfVision: generate (Bunglow), onExitFieldOfVision:generate (Bunglow) }); function generate(id)?{ ? document.location = "architectsdk://TrackerDidDiscoveredImageTarget?id="+id;? }
I just want to reterieve the target name of recognized image,i.e which image from multiple images is recognized? Please suggest me , give some sample code if possible that how to reterieve targetname from Trackable2DObject.
r
rahul soni
said
almost 11 years ago
Thanks for reply Sir,
Sir your answer is not visible properly, please repost this answer, last words of you sample code is not seen.
And second thing , i want to reterieve targetids name from database, so how to reterieve this targetids name from databse to this your variable var targetIds
var targetIds = ;
on its place i want var targetIds = names from database ? how to do this?
W
Wolfgang Damm
said
almost 11 years ago
To recognize a target you will need to create a Trackable2dObject for it. At creation the Trackable2dObject requires the targetName.
Here is what I would do (be aware untested/never compiled code)
I updated the initial post to show the previously hidden parts.
Depending on where your database is there are 2 options:
You are using our SDK in your own app and the database is on the device -> execute callJavascript method of the ARchitectView from native code supplying the data you need. e.g. you defined a newData function in your javascript that processes the data, then arView.callJavascript("newData()"); will call the newData mehtod with the array.
You have the data on the server, write a webservice and access it with XMLHttpRequests from javascript.
r
rahul soni
said
almost 11 years ago
Thanks Wolfgang
Now i have another problem that my application beomes crashes agter 3-4 successful recognization of images, i think its because of not releasing object array of trackable2d Object's array and Architect object, i am not releasing Architect object because i am using ARC concept ,
So tell me how to release trackable2dObjects array which is in my .html file? and is it necessary to release ARchitect object, so my application will not be crashes?
help me.
r
rahul soni
said
almost 11 years ago
IR mode, which uses more computing power (and battery power), is started whenever you create a Tracker. Thus make sure to call destroy() on the Tracker if you don?t require the IR instance anymore. If all Trackers are destroyed, IR mode is exited automatically.
So where to apply this destroy methos and how:?
W
Wolfgang Damm
said
almost 11 years ago
you can call the destroy method on any architect object.
e.g.
var tracker = new AR.Tracker(...);
...
tracker.destroy();
r
rahul soni
said
almost 11 years ago
I using this code, , so no image tracking is done ? and its right also because we destroy this object? so where i call this function? please suggest me?
rahul soni