{"__v":4,"_id":"568166af30018c0d006bf7fd","category":{"__v":7,"_id":"55bb441b54f9640d006e6cf2","pages":["55bb4450a8400c2d00873dd9","55bb46afa8400c2d00873de6","55bb46cca8400c2d00873dea","55bb4704a8400c2d00873ded","55bb47477313650d00c46e1e","568166af30018c0d006bf7fd","5685143fd96a760d00545d71"],"project":"559a61d2dbcfd20d00710b39","version":"559a61d2dbcfd20d00710b3c","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-07-31T09:47:07.862Z","from_sync":false,"order":6,"slug":"cordova-phonegap","title":"Cordova / PhoneGap SDK"},"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-28T16:43:27.410Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":1,"body":"The following are a set of required and optional configuration values you should set in your config.xml\n[block:parameters]\n{\n  \"data\": {\n    \"h-0\": \"Key\",\n    \"h-1\": \"Type\",\n    \"h-2\": \"Default Value\",\n    \"h-3\": \"Description\",\n    \"h-4\": \"\",\n    \"0-0\": \"moca_app_key\",\n    \"0-1\": \"String (required)\",\n    \"0-3\": \"App key from MOCA Console\",\n    \"1-0\": \"moca_app_secret\",\n    \"1-1\": \"String (required)\",\n    \"1-3\": \"App secret from MOCA Console\",\n    \"2-0\": \"moca_log_level\",\n    \"2-1\": \"String\",\n    \"2-3\": \"MOCA SDK logging level:\\n* trace\\n* debug\\n* info\\n* warn\\n* error\",\n    \"2-2\": \"\\\"info\\\"\",\n    \"3-0\": \"moca_cache_disk_size_in_mb\",\n    \"3-1\": \"Integer\",\n    \"3-3\": \"Maximum local disk space available for SDK cache.\",\n    \"3-2\": \"100\",\n    \"4-0\": \"moca_automatic_push_setup_enabled\",\n    \"4-3\": \"If enabled, the SDK will automatically subscribe the app to push notification services and obtain push token.\",\n    \"4-1\": \"BOOL\",\n    \"4-2\": \"YES\",\n    \"5-0\": \"moca_proximity_service_enabled\",\n    \"5-1\": \"BOOL\",\n    \"5-2\": \"YES\",\n    \"5-3\": \"Enables or disables Bluetooth Beacon monitoring and ranging & geofence detection using *iOS Location Services*\",\n    \"6-0\": \"moca_geolocation_service_enabled\",\n    \"6-1\": \"BOOL\",\n    \"6-2\": \"YES\",\n    \"6-3\": \"Enables/disables tracking of significant changes in user location by GPS/Cellular Trilateration/Wifi.\\n\\nWhen enabled (YES), user location will be tracked when the app is in foreground. Additionally, background tracking is controlled by BACKGROUND_LOCATION_ENABLED flag. This is the default.\\n\\nWhen disabled (NO), user location will not be tracked at all (neither in foreground nor on background). However, Bluetooth beacons and geofences will still be detected if this flag is set to NO.\",\n    \"7-0\": \"moca_background_location_enabled\",\n    \"7-1\": \"BOOL\",\n    \"7-2\": \"YES\",\n    \"7-3\": \"Enables/disables location tracking when the app is in background or suspended mode.\\n\\nThis flag has no effect if GEOLOCATION_SERVICE_ENABLED is set to NO.\\n\\nBy default background location tracking is enabled.\"\n  },\n  \"cols\": 4,\n  \"rows\": 8\n}\n[/block]\nFor further app permission configuration requirements please checkout [iOS'](http://developer.mocaplatform.com/docs/moca-ios-sdk-configuration#app-capabilities) and [Android's](http://developer.mocaplatform.com/docs/moca-android-sdk-configuration#setting-app-permissions) different needs.","excerpt":"","slug":"configuration","type":"basic","title":"Configuration"}
The following are a set of required and optional configuration values you should set in your config.xml [block:parameters] { "data": { "h-0": "Key", "h-1": "Type", "h-2": "Default Value", "h-3": "Description", "h-4": "", "0-0": "moca_app_key", "0-1": "String (required)", "0-3": "App key from MOCA Console", "1-0": "moca_app_secret", "1-1": "String (required)", "1-3": "App secret from MOCA Console", "2-0": "moca_log_level", "2-1": "String", "2-3": "MOCA SDK logging level:\n* trace\n* debug\n* info\n* warn\n* error", "2-2": "\"info\"", "3-0": "moca_cache_disk_size_in_mb", "3-1": "Integer", "3-3": "Maximum local disk space available for SDK cache.", "3-2": "100", "4-0": "moca_automatic_push_setup_enabled", "4-3": "If enabled, the SDK will automatically subscribe the app to push notification services and obtain push token.", "4-1": "BOOL", "4-2": "YES", "5-0": "moca_proximity_service_enabled", "5-1": "BOOL", "5-2": "YES", "5-3": "Enables or disables Bluetooth Beacon monitoring and ranging & geofence detection using *iOS Location Services*", "6-0": "moca_geolocation_service_enabled", "6-1": "BOOL", "6-2": "YES", "6-3": "Enables/disables tracking of significant changes in user location by GPS/Cellular Trilateration/Wifi.\n\nWhen enabled (YES), user location will be tracked when the app is in foreground. Additionally, background tracking is controlled by BACKGROUND_LOCATION_ENABLED flag. This is the default.\n\nWhen disabled (NO), user location will not be tracked at all (neither in foreground nor on background). However, Bluetooth beacons and geofences will still be detected if this flag is set to NO.", "7-0": "moca_background_location_enabled", "7-1": "BOOL", "7-2": "YES", "7-3": "Enables/disables location tracking when the app is in background or suspended mode.\n\nThis flag has no effect if GEOLOCATION_SERVICE_ENABLED is set to NO.\n\nBy default background location tracking is enabled." }, "cols": 4, "rows": 8 } [/block] For further app permission configuration requirements please checkout [iOS'](http://developer.mocaplatform.com/docs/moca-ios-sdk-configuration#app-capabilities) and [Android's](http://developer.mocaplatform.com/docs/moca-android-sdk-configuration#setting-app-permissions) different needs.