Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. var app = {
  2.  
  3. initialize: function()
  4.  
  5. {
  6.  
  7. this.bindEvents();
  8.  
  9. },
  10.  
  11. bindEvents: function ()
  12.  
  13. {
  14.  
  15. document.addEventListener('deviceready',this.onDeviceReady(),
  16. false)},
  17. onDeviceReady: function () {
  18.  
  19. canvas.width = window.innerWidth;
  20.  
  21. canvas.height = window.innerHeight;
  22.  
  23. window.addEventListener('touchstart', function(event){
  24.  
  25. console.log(event.touches);
  26.  
  27. touchX = event.touches[0].pageX;
  28.  
  29. touchY = event.touches[0].pageY;
  30.  
  31. console.log(touchX, touchY);
  32.  
  33. if (touchX <= button1.x + button1.width && touchX >= button1.x)
  34. {
  35. if (touchY <= button1.y + button1.height && touchY >=
  36. button1.y) {
  37. check = 1; // Everything is fine until here.
  38. bluetoothSerial.isEnabled(success(), fail()); // the code
  39. here and below here is never executed.
  40. c.font = "80px Arial";
  41. c.fillText("here",50,50);
  42. }
  43. }
  44.  
  45. serialBluetooth is not defined error.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement