Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hello Everyone,
Good Afternoon,
I want to send Start Time & End Time of experience from Vuforia Studio into ThingWorx.
Can anyone guide me how can I achieve it?
Thanks in advance.
Regards,
Aditya Gupta
Article - "How to write data to a ThingWorx stream from Vuforia Studio": https://www.ptc.com/en/support/article/CS304458
Hi @Aditya1702,
I want to add some further details to the answer of @VladimirN which referes to techniques showing how to wirte an entry to TWX log . There some addtional taks to complete the task
- Question when you need to call that twx service and how to prepare the time string:
$scope.$on('$ionicView.afterEnter', function() {
// when you enter a view , you can call that from there
})
$scope.app.fn.navigateToScanMode()
-what string you will write there .e.g. the timestring
//=================================================================================================
$scope.getTime = function() {
var date = new Date();
var h = date.getHours(); // 0 - 23
var m = date.getMinutes(); // 0 - 59
var s = date.getSeconds(); // 0 - 59
var session = "AM";
if(h == 0){h = 12;}
if(h > 12){h = h - 12;session = "PM";}
h = (h < 10) ? "0" + h : h;
m = (m < 10) ? "0" + m : m;
s = (s < 10) ? "0" + s : s;
var time = h + ":" + m + ":" + s + " " + session;
return time;
}