index.html 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <!DOCTYPE html>
  2. <html>
  3. <script>
  4. <!--
  5. var status = true;
  6. // TODO: update
  7. var appname = "aogomcpmfofdjjloaepnhogollhgphbg";
  8. appname = "xwalk." + appname;
  9. function log(arg) {
  10. console.log("### log: homescreen: " + arg);
  11. }
  12. function onSuccess() {
  13. log("onSuccess");
  14. tizen.application.getCurrentApplication().hide();
  15. }
  16. function onError() {
  17. log("onError");
  18. }
  19. function change() {
  20. log("change: { " + appname);
  21. if (false) {
  22. // make sure it actually hide , if not damage area using mouse event
  23. tizen.application.getCurrentApplication().hide();
  24. } else {
  25. tizen.application.launch(appname, onSuccess, onError);
  26. }
  27. log("change: }");
  28. }
  29. // -->
  30. </script>
  31. <body>
  32. <h1>HOMESCREEN</h1>
  33. <pre>
  34. <script>
  35. log("homescreen: %{version}" + status);
  36. document.write(window.location.href);
  37. log("homescreen: { may fail");
  38. var app = tizen.application.getCurrentApplication();
  39. log("homescreen: } check if not failed ?");
  40. log("homescreen: id=" + app.appInfo.id);
  41. document.write("Current application's app id is " + app.appInfo.id);
  42. if (true) {
  43. setTimeout('change()', 10000);
  44. }
  45. </script>
  46. </pre>
  47. <input type="button" onclick="change();" value="change" />
  48. <input type="button"
  49. onclick="tizen.application.getCurrentApplication().hide();"
  50. value="hide" />
  51. <input type="checkbox" onchange="status!=status;" value="checked" />
  52. </body>
  53. </html>