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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Start Chalk from a 2D Experience

fbdsilva
10-Marble

Start Chalk from a 2D Experience

Hi Community,

 

I am wondering if would be possible to start Vuforia Chalk App from a Studio 2D Experience like we can do using the Chalk button on 3D Experiences.

I know there is no widget for that but maybe someone can point me to a way to start an app using realwear API from JavaScript.

 

Any ideas are welcome.

 

Thanks in advance,

Felipe Duarte

ACCEPTED SOLUTION

Accepted Solutions

Hi @fbdsilva 

we do not have extra chalk widget but calling of chalk in 2d widget but it should work also from Hyperlink widget and also via JavaScript code

So to work this is required:

- chalk is installed on the mobile platform

- I think the first time when you start chalk from Vuforia View  it will request permissions for starting chalk

- this will not work in Preview mode - only on mobile device

Here in the picture  below - there  are shown 2 ways - 1.) hyperlink widget via URL (url=https://admin.vuforiachalk.com/call)

or 2.)  form  button calling js code (it could be any widget supporting UI JS box on click or other actions)

 

 


 

 

2021-03-29_10-56-43.jpg

 

where in US UI  you can use e.g. one of the following js code chalk() or location() - I tested both on IOS  device Ipad and  they are working fine. 

 

 

/////////////////////////////////////////////////// this will not has effect on IOS
$scope.chalk = function ( ) {
  console.log('call https://admin.vuforiachalk.com/call' );
  try{
    
 	window.location.href='https://admin.vuforiachalk.com/call'; 
     twx.app.fn.addSnackbarMessage("window.location.href="+window.location.href,"twLogo");
  }
  catch(e)
  {
    alert('call failed ' + e); 
  }
}
///////////////////////////////////////////////////
//or
///////////////////////////////////////////////////
$scope.location = function () {
 
  try{
    $timeout( () => {var ref = window.location='https://admin.vuforiachalk.com/call' ;
                                        
                 twx.app.fn.addSnackbarMessage("window.location="+ref,"twLogo");},500) 
  }
  catch(e)
  {
    alert('chalk location failed ' + e); 
  }
}

 

 

 

View solution in original post

2 REPLIES 2

Hi @fbdsilva 

we do not have extra chalk widget but calling of chalk in 2d widget but it should work also from Hyperlink widget and also via JavaScript code

So to work this is required:

- chalk is installed on the mobile platform

- I think the first time when you start chalk from Vuforia View  it will request permissions for starting chalk

- this will not work in Preview mode - only on mobile device

Here in the picture  below - there  are shown 2 ways - 1.) hyperlink widget via URL (url=https://admin.vuforiachalk.com/call)

or 2.)  form  button calling js code (it could be any widget supporting UI JS box on click or other actions)

 

 


 

 

2021-03-29_10-56-43.jpg

 

where in US UI  you can use e.g. one of the following js code chalk() or location() - I tested both on IOS  device Ipad and  they are working fine. 

 

 

/////////////////////////////////////////////////// this will not has effect on IOS
$scope.chalk = function ( ) {
  console.log('call https://admin.vuforiachalk.com/call' );
  try{
    
 	window.location.href='https://admin.vuforiachalk.com/call'; 
     twx.app.fn.addSnackbarMessage("window.location.href="+window.location.href,"twLogo");
  }
  catch(e)
  {
    alert('call failed ' + e); 
  }
}
///////////////////////////////////////////////////
//or
///////////////////////////////////////////////////
$scope.location = function () {
 
  try{
    $timeout( () => {var ref = window.location='https://admin.vuforiachalk.com/call' ;
                                        
                 twx.app.fn.addSnackbarMessage("window.location="+ref,"twLogo");},500) 
  }
  catch(e)
  {
    alert('chalk location failed ' + e); 
  }
}

 

 

 

That´s perfect. It was exactly what I was looking for.

 

Many thanks!

Announcements

Top Tags