Skip to main content
1-Visitor
February 9, 2020
Question

Getting a 3D alert to work on HoloLens (Ionic Framework)

  • February 9, 2020
  • 1 reply
  • 2880 views

Hello,

 

I am using the following code to give popups/alerts during my experience. I have tested the code both on a mobile project and a 3D eyewear project. The code works fine on a mobile project, but on the 3D project using HoloLens will nothing appear. 

 

Does HoloLens not support the Ionic framework or am I missing something? 

 

$scope.Evaluate = function()
{
 var stopOrFix = $ionicPopup.confirm({
 title: "Machine Error Found",
 template: "Decide if you want to fix the machine error now or move on",
 cancelText: "Move on",
 cancelType: "button-default",
 okText: "Fix it now",
 okType: "button-default"
 });
 
 stopOrFix.then(function(res){
 if (res)
 {
 // Make it possible to scan again 
 console.log("If statement called");
 $scope.Alert();
 
 
 } else { 
 // do nothing
 console.log("Move on");
 }
 
 
 })
};

$scope.Alert = function()
{
 var alertPopup = $ionicPopup.alert(
 {
 title: "Machine Error found",
 template: "Scan the QR code of the machine to get info"
 });
 
 alertPopup.then(function(res)
 {
 console.log("Console logging");
 }); 
};

 

1 reply

21-Topaz I
February 11, 2020

Hi @KasperLEGO ,

 

so far I know, it was not possible in generally possible to do this because  the HoloLens does not support 2d elements - means also the IsonicPopus. I checked first if in the meantime the functionality change but seem still it does not work also in the current version. The IsonicPopus  will work in the project preview, because the chrome and the Vuforia studio thingview support 2d elements for mobile 2d and 3d -  but on end device HoloLens it will not  work. I could also confirm this behavior after test by myself (with HoloLens 1 device)  when I test it that in preview mode Ionic framework is shown / e.g. the alert popup/ but this will not be called when you try this on the HoloLens device .

What we can do?

I think we can use a 3d Element instead which should implement the dialog.. For example, 3D Image which displays your dialog / you can use a picture or can generate it dynamically as SVG file format. 

The different buttons you can play  e.g. in front of the 3d image on some small distance so that you will be able to tap on it

 

2020-02-11_12-05-14.gif

1-Visitor
March 4, 2020

Hi Roland,

 

I understand your alternative solution with 3D images, but to my understanding are they be placed firmly in the users view (e.g. as 2D popup will be), which is what I am looking for. 

 

Using a 3D image will require you to place it exactly where you want the user to be, which can be problematic if you are moving around in a certain area, which is why the Ionic popups where perfect for the task. Are there any way to get 3D images fixed in the user field of view no matter where they are?

6-Contributor
October 20, 2021

How can we make a 3D Widget on HoloLens visible i... - PTC Community

 

I've found this helpful link! If you have it finished, do you think that you can share with the community your final "popup"?

 

Thanks a lot