{"_id":"59e70b9fe027ae002e7d2f21","category":{"_id":"59e70b9ee027ae002e7d2ed5","version":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":0,"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-12-01T13:29:31.291Z","from_sync":false,"order":2,"slug":"android-reference","title":"Android Reference"},"project":"5496d393f52a630b00519cdd","user":"5496d353f52a630b00519cdc","parentDoc":null,"version":{"_id":"59e70b9ee027ae002e7d2ed2","project":"5496d393f52a630b00519cdd","__v":2,"createdAt":"2017-10-18T08:06:54.462Z","releaseDate":"2017-10-18T08:06:54.462Z","categories":["59e70b9ee027ae002e7d2ed3","59e70b9ee027ae002e7d2ed4","59e70b9ee027ae002e7d2ed5","59e70b9ee027ae002e7d2ed6","59e70b9ee027ae002e7d2ed7","59e70b9ee027ae002e7d2ed8","59e70b9ee027ae002e7d2ed9","59e70b9ee027ae002e7d2eda","59e70b9ee027ae002e7d2edb","59e70b9ee027ae002e7d2edc","59e70b9ee027ae002e7d2edd","59e70b9ee027ae002e7d2ede","59e70b9ee027ae002e7d2edf","5b8661ccdd19310003a3fa0b"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"2.0.10","version":"2.0.10"},"githubsync":"","__v":0,"updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-10-03T17:15:33.237Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"settings":"","results":{"codes":[]},"auth":"required","params":[],"url":""},"isReference":false,"order":4,"body":"Version 2.7.x leverages the Android's JobScheduler and deprecates the usage of AlarmManager, in order to improve performance and minimize SDK footprint. \n\n##Step 1: Pull the SDK\nTo pull the new SDK, update the 'dependencies' in build.gradle as follows:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"dependencies {\\n   compile 'com.placer:placer:2.7.+:::at:::aar'\\n}\",\n      \"language\": \"groovy\",\n      \"name\": \"build.gradle\"\n    }\n  ]\n}\n[/block]\n##Step 2:  Update the AndroidManifest.xml\nThis version includes some changes to Placer's Service/Provider. Make sure you delete the Placer Service (named: com.placer.client.PlacerService) and add the following instead:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"<application>\\n...\\n    <service\\n        android:name=\\\"com.placer.client.PlacerScheduler\\\"\\n        android:exported=\\\"false\\\"\\n        android:permission=\\\"android.permission.BIND_JOB_SERVICE\\\"\\n        android:process=\\\":background\\\" />\\n  \\n    <receiver\\n        android:name=\\\"com.placer.client.PlacerReceiver\\\"\\n        android:enabled=\\\"true\\\"\\n        android:exported=\\\"false\\\"\\n        android:process=\\\":background\\\">\\n        <intent-filter>\\n            <action android:name=\\\"android.intent.action.BOOT_COMPLETED\\\" />\\n            <action android:name=\\\"android.intent.action.USER_PRESENT\\\" />\\n            <action android:name=\\\"com.placer.action.ENABLE_PLACER\\\" />\\n            <action android:name=\\\"com.placer.action.DISABLE_PLACER\\\" />\\n        </intent-filter>\\n    </receiver>\\n  \\n\\t  <provider\\n\\t\\t\\t\\tandroid:name=\\\"com.placer.library.tray.provider.TrayContentProvider\\\"\\n        android:authorities=\\\"${applicationId}.tray\\\"\\n        android:exported=\\\"false\\\"\\n        android:multiprocess=\\\"false\\\" />\\n...\\n</application>\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml - NEW\"\n    },\n    {\n      \"code\": \"<application>\\n  ...\\n  <service\\n            android:name=\\\"com.placer.client.PlacerService\\\"\\n            android:enabled=\\\"true\\\"\\n            android:exported=\\\"false\\\"\\n            android:process=\\\":background\\\" />\\n\\n    <receiver\\n            android:name=\\\"com.placer.client.PlacerReceiver\\\"\\n            android:enabled=\\\"true\\\"\\n            android:exported=\\\"true\\\"\\n            android:process=\\\":background\\\">\\n            <intent-filter>\\n            <action android:name=\\\"android.intent.action.BOOT_COMPLETED\\\" />\\n            <action android:name=\\\"android.intent.action.USER_PRESENT\\\" />\\n            </intent-filter>\\n    </receiver>\\n  ...\\n</application>\",\n      \"language\": \"xml\",\n      \"name\": \"AndroidManifest.xml - OLD\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"The new version does **not** include changes to the app's permissions or user experience. Make sure you don't remove the permissions mentioned in our [Getting Started guide](doc:getting-started).\"\n}\n[/block]\n##That's it!\nYou're good to go.","excerpt":"Upgrade instructions from Placer Android SDK 2.6.x to 2.7.x","slug":"upgrade-to-sdk-version-27x","type":"basic","title":"Upgrade to SDK version 2.7.x"}

Upgrade to SDK version 2.7.x

Upgrade instructions from Placer Android SDK 2.6.x to 2.7.x

Version 2.7.x leverages the Android's JobScheduler and deprecates the usage of AlarmManager, in order to improve performance and minimize SDK footprint. ##Step 1: Pull the SDK To pull the new SDK, update the 'dependencies' in build.gradle as follows: [block:code] { "codes": [ { "code": "dependencies {\n compile 'com.placer:placer:2.7.+@aar'\n}", "language": "groovy", "name": "build.gradle" } ] } [/block] ##Step 2: Update the AndroidManifest.xml This version includes some changes to Placer's Service/Provider. Make sure you delete the Placer Service (named: com.placer.client.PlacerService) and add the following instead: [block:code] { "codes": [ { "code": "<application>\n...\n <service\n android:name=\"com.placer.client.PlacerScheduler\"\n android:exported=\"false\"\n android:permission=\"android.permission.BIND_JOB_SERVICE\"\n android:process=\":background\" />\n \n <receiver\n android:name=\"com.placer.client.PlacerReceiver\"\n android:enabled=\"true\"\n android:exported=\"false\"\n android:process=\":background\">\n <intent-filter>\n <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n <action android:name=\"android.intent.action.USER_PRESENT\" />\n <action android:name=\"com.placer.action.ENABLE_PLACER\" />\n <action android:name=\"com.placer.action.DISABLE_PLACER\" />\n </intent-filter>\n </receiver>\n \n\t <provider\n\t\t\t\tandroid:name=\"com.placer.library.tray.provider.TrayContentProvider\"\n android:authorities=\"${applicationId}.tray\"\n android:exported=\"false\"\n android:multiprocess=\"false\" />\n...\n</application>", "language": "xml", "name": "AndroidManifest.xml - NEW" }, { "code": "<application>\n ...\n <service\n android:name=\"com.placer.client.PlacerService\"\n android:enabled=\"true\"\n android:exported=\"false\"\n android:process=\":background\" />\n\n <receiver\n android:name=\"com.placer.client.PlacerReceiver\"\n android:enabled=\"true\"\n android:exported=\"true\"\n android:process=\":background\">\n <intent-filter>\n <action android:name=\"android.intent.action.BOOT_COMPLETED\" />\n <action android:name=\"android.intent.action.USER_PRESENT\" />\n </intent-filter>\n </receiver>\n ...\n</application>", "language": "xml", "name": "AndroidManifest.xml - OLD" } ] } [/block] [block:callout] { "type": "info", "title": "Note", "body": "The new version does **not** include changes to the app's permissions or user experience. Make sure you don't remove the permissions mentioned in our [Getting Started guide](doc:getting-started)." } [/block] ##That's it! You're good to go.