2D Image Widget Refresh
Good morning,
In a Vuforia Studio mobile application, I would like to link the source of an 2D Image Widget to an external http(s) source which handles a picture to display.
The picture served back at the http request is not constant, as it changes at each http request. I would like to periodically call the server and display the corresponding picture.
Here is what I managed to do so far:
// $scope, $element, $attrs, $injector, $sce, $timeout, $http, $ionicPopup, and $ionicPopover services are available
$scope.streamSourceSet = function(){
$scope.view.wdg['testImage']['imgsrc'] = "http://10.1.27.14:5000/get_image"
$scope.$applyAsync()
}
// Set the timer
$scope.periodicCall = function(){
setInterval($scope.streamSourceSet, 500);
}
// Call the localize function at view start-up
angular.element(document).ready($scope.periodicCall);
This code produces a single picture for the Image Widget, but it does not get updated every 500 ms as desired.
The question is: how do I force the Image Widget to make another http(s) call?
Is there another way to make a http(s) call and pass the result (the picture) to the Image widget?
Many thanks,
Riccardo

