Skip to main content
1-Visitor
March 9, 2021
Solved

Close the application on button click

  • March 9, 2021
  • 1 reply
  • 1317 views

Hi, 

 

I have developed an AR app on Hololens 2 view. I want to close my app on button click. How can I do this?

 

Thanks

 

Best answer by RolandRaytchev

Hi @AS16 ,

 

I checked the javascript api and it seems that there is no API provided by Vuforia Studio  for  javascript to close the Vuforia View app. I found also an internal development ticket where this was mentioned that this is not planned to be implemented (dev statement form Sept 2020 :" since we do not have any plans to allow exiting the app").

Internally the cordova plugin have API to close an app but this seems not to be past to the Javascript Studio interface so that I could not find any way yet to call it from  javascript e.g. in the Home.js. [ the cordova method is app.exitApp()  e.g. used in the app-runtime.js : ionicPlatform.exitApp() ] 

Currently Studio provide the api : 

 

app.fn.navigateToScanMode();

 

this will lead that Vuforia view will left the current view and will go back to scan mode.

May be it is possible to call some javacode which will lead crash the Vuforia view and will close the view or some external process libraries which will close the app but there is no guaranty if this will always work( on all supported platform and in the future version)

 

1 reply

21-Topaz I
March 11, 2021

Hi @AS16 ,

 

I checked the javascript api and it seems that there is no API provided by Vuforia Studio  for  javascript to close the Vuforia View app. I found also an internal development ticket where this was mentioned that this is not planned to be implemented (dev statement form Sept 2020 :" since we do not have any plans to allow exiting the app").

Internally the cordova plugin have API to close an app but this seems not to be past to the Javascript Studio interface so that I could not find any way yet to call it from  javascript e.g. in the Home.js. [ the cordova method is app.exitApp()  e.g. used in the app-runtime.js : ionicPlatform.exitApp() ] 

Currently Studio provide the api : 

 

app.fn.navigateToScanMode();

 

this will lead that Vuforia view will left the current view and will go back to scan mode.

May be it is possible to call some javacode which will lead crash the Vuforia view and will close the view or some external process libraries which will close the app but there is no guaranty if this will always work( on all supported platform and in the future version)