cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with url on mobile device

SOLVED
Highlighted
Amethyst

Problem with url on mobile device

Hi everyone, 

I want to open a link to a page (that could be on the interenet or intranet). I'm testing the function with an internet link (es. https://www.google.com/) but there is some problem: in preview mode I'm able to open the link, in mobile device nothing happens. 

 

In 2D canvas I put a button that call this function:

 

$scope.openConfirmationPage=function(){
	let url= "https://www.google.com/"
	window.open(url)
}

 

 

Anyone has a solution?

 

Thank you. 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Problem with url on mobile device

Now tested on mobile:

- similar to your code - and it was working on both android and IOS - using the href property:

 

$scope.app.openConfirmationPage=function(){
	let url= "https://www.google.com/"
	window.open(url)
}

$scope.app.href = function () {
 
  try{
    $timeout( () => {var ref = window.location.href='http://getstatuscode.com/200';
                                        
                 twx.app.fn.addSnackbarMessage("window.location.href="+window.location.href,"twLogo");},500) 
  }
  catch(e)
  {
    alert('redir failed ' + e); 
  }
}

$scope.app.href1 = function () {
 
  try{
    $timeout( () => {var ref = window.location.href='https://www.google.com/';
                                        
                 twx.app.fn.addSnackbarMessage("window.location.href="+window.location.href,"twLogo");},500) 
  }
  catch(e)
  {
    alert('redir failed ' + e); 
  }
}

 

2020-10-08_11-23-02.jpg

so the test on IOS and Android couold open the google web side

2020-10-08_11-28-08.jpg

You can  try to test it on your devise by scanning of the QR code:

2020-10-08_11-28-08.jpg

View solution in original post

4 REPLIES 4
Highlighted

Re: Problem with url on mobile device

On HoloLens 2 this code is working fine - open a external window wher the google side is displayed - I mixed up, with the next question - on HoloLens 2 device, but will now check it on mobile -IOS.

Highlighted

Re: Problem with url on mobile device

Thank you, the develop is running on iOS device. No hololens for the moment. 

 

 

Highlighted

Re: Problem with url on mobile device

Now tested on mobile:

- similar to your code - and it was working on both android and IOS - using the href property:

 

$scope.app.openConfirmationPage=function(){
	let url= "https://www.google.com/"
	window.open(url)
}

$scope.app.href = function () {
 
  try{
    $timeout( () => {var ref = window.location.href='http://getstatuscode.com/200';
                                        
                 twx.app.fn.addSnackbarMessage("window.location.href="+window.location.href,"twLogo");},500) 
  }
  catch(e)
  {
    alert('redir failed ' + e); 
  }
}

$scope.app.href1 = function () {
 
  try{
    $timeout( () => {var ref = window.location.href='https://www.google.com/';
                                        
                 twx.app.fn.addSnackbarMessage("window.location.href="+window.location.href,"twLogo");},500) 
  }
  catch(e)
  {
    alert('redir failed ' + e); 
  }
}

 

2020-10-08_11-23-02.jpg

so the test on IOS and Android couold open the google web side

2020-10-08_11-28-08.jpg

You can  try to test it on your devise by scanning of the QR code:

2020-10-08_11-28-08.jpg

View solution in original post

Highlighted

Re: Problem with url on mobile device

It works. 

 

Thank you

Announcements
Join an
AR Working Group!

Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection