{"__v":1,"_id":"5683e9ed72bb720d0091f64e","category":{"__v":2,"_id":"5681681330018c0d006bf7ff","pages":["5683c92f4aecbd0d00a465c2","5683e9ed72bb720d0091f64e"],"project":"559a61d2dbcfd20d00710b39","version":"559a61d2dbcfd20d00710b3c","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-28T16:49:23.982Z","from_sync":false,"order":13,"slug":"cordova-api-reference","title":"Cordova / PhoneGap SDK Reference"},"parentDoc":null,"project":"559a61d2dbcfd20d00710b39","user":"55a61860249a40190051d941","version":{"__v":23,"_id":"559a61d2dbcfd20d00710b3c","project":"559a61d2dbcfd20d00710b39","createdAt":"2015-07-06T11:09:06.510Z","releaseDate":"2015-07-06T11:09:06.510Z","categories":["559a61d3dbcfd20d00710b3d","55a589ddaaf9cf1900114dd0","55a589e30f354f0d00fd0312","55a589ea80c8a30d00b323cc","55a589f6aaf9cf1900114dd1","55a58d4e80c8a30d00b323e6","55a8e7a227a17d21005251a2","55a93098cf45e1390093f351","55afb085f202b12100cd9e83","55afb22e902fd51700f5f8bf","55afb260902fd51700f5f8c2","55afb28ec8a85321007a5462","55afb294f202b12100cd9e95","55afb29b902fd51700f5f8c5","55afb2a1c8a85321007a5463","55afb2a7902fd51700f5f8c7","55afb2ad902fd51700f5f8c8","55afb2b5902fd51700f5f8ca","55b74b2131bccb190081bedc","55bb441b54f9640d006e6cf2","565711085cb2420d00d70071","5681681330018c0d006bf7ff","588f38b5923d610f00c72dad"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"Version 1.0","version_clean":"1.0.0","version":"1"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-12-30T14:27:57.235Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"var MOCA = function () {\\n    // CONSTANTS\\n    // Events\\n    this.DID_ENTER_RANGE = \\\"enterBeacon\\\";\\n    this.DID_EXIT_RANGE = \\\"exitBeacon\\\";\\n    this.BEACON_PROXIMITY_CHANGE = \\\"beaconProximityChange\\\";\\n    this.DID_ENTER_PLACE = \\\"enterPlace\\\";\\n    this.DID_EXIT_PLACE = \\\"exitPlace\\\";\\n    this.DID_ENTER_ZONE = \\\"enterZone\\\";\\n    this.DID_EXIT_ZONE = \\\"exitZone\\\";\\n\\n    // Actions\\n    this.DISPLAY_ALERT = \\\"displayAlert\\\";\\n    this.OPEN_URL = \\\"openUrl\\\";\\n    this.SHOW_EMBEDDED_HTML = \\\"showEmbeddedHtml\\\";\\n    this.PLAY_VIDEO_FROM_URL = \\\"playVideo\\\";\\n    this.IMAGE_FROM_URL = \\\"showImage\\\";\\n    this.PASSBOOK_FROM_URL = \\\"addPassbook\\\";\\n    this.ADD_TAG = \\\"addTag\\\";\\n    this.PLAY_NOTIFICATION_SOUND = \\\"playSound\\\";\\n    this.PERFORM_CUSTOM_ACTION = \\\"customAction\\\";\\n\\n    // Other\\n    this.DID_LOADED_BEACONS_DATA = \\\"didLoadedBeaconsData\\\";\\n    \\n    this.APP_KEY = \\\"moca_app_key\\\";\\n    this.APP_SECRET = \\\"moca_app_secret\\\";\\n\\n    this.GCM_SENDER_ID = \\\"gcm_sender_id\\\";\\n};\",\n      \"language\": \"javascript\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"javascript-moca-constants","type":"basic","title":"Javascript MOCA Constants"}

Javascript MOCA Constants


[block:code] { "codes": [ { "code": "var MOCA = function () {\n // CONSTANTS\n // Events\n this.DID_ENTER_RANGE = \"enterBeacon\";\n this.DID_EXIT_RANGE = \"exitBeacon\";\n this.BEACON_PROXIMITY_CHANGE = \"beaconProximityChange\";\n this.DID_ENTER_PLACE = \"enterPlace\";\n this.DID_EXIT_PLACE = \"exitPlace\";\n this.DID_ENTER_ZONE = \"enterZone\";\n this.DID_EXIT_ZONE = \"exitZone\";\n\n // Actions\n this.DISPLAY_ALERT = \"displayAlert\";\n this.OPEN_URL = \"openUrl\";\n this.SHOW_EMBEDDED_HTML = \"showEmbeddedHtml\";\n this.PLAY_VIDEO_FROM_URL = \"playVideo\";\n this.IMAGE_FROM_URL = \"showImage\";\n this.PASSBOOK_FROM_URL = \"addPassbook\";\n this.ADD_TAG = \"addTag\";\n this.PLAY_NOTIFICATION_SOUND = \"playSound\";\n this.PERFORM_CUSTOM_ACTION = \"customAction\";\n\n // Other\n this.DID_LOADED_BEACONS_DATA = \"didLoadedBeaconsData\";\n \n this.APP_KEY = \"moca_app_key\";\n this.APP_SECRET = \"moca_app_secret\";\n\n this.GCM_SENDER_ID = \"gcm_sender_id\";\n};", "language": "javascript" } ] } [/block]