We have fully revamped our Android SDK to support new features released by Google, including the Android Advertising ID. To take advantage of these changes in your application, there are few a steps to follow in order to upgrade from Apsalar's Android SDK 4.X.X to 6.X.X:
- Update required libraries:
- Download the latest Android 6.X.X Android SDK.
- Remove the previous apsalar.jar file from your application's project libs folder.
- Unpack the SDK and add the new apsalar.jar into the libs folder of your Android application's project directory.
- To utilize Android's new Advertising ID, you must include Google Play Services API 7.5 or higher. If you haven't added this to your application already, please follow the instructions provided by Google. Here's a quick example of the simplest integration of Google Play Services API:
- Download the Google Play Services SDK
- Include google_play_service_lib as a dependency in your application's project
- Add the following as a child of the <application> element in your manifest file:
- Add the following <activity> element in your manifest file:
- Include the android-support-v4.jar and the google-play-services.jar in the build path for your app. These libraries provide necessary Android classes required for ensuring Google Play calls are properly handled. To implement:
- In Android Developer Tool, right click on your Android application's project and select Android Tools from the left hand menu.
- Select Add Support Library and select the android-support-v4.jar.
- Add the google-play-services.jar to your application’s libs directory. The google-play-services.jar can be found under <ADT-install-path>/sdk/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar
- In Android Developer Tools, right click the google-play-services.jar and select Add to Build Path.
- Update your receiver. With Apsalar's latest SDK memory leaks with your apps's broadcast receiver can be avoided by unregistering it when your app exits, and the SDK now supports a custom receiver compatible with additional internal or third party receiver needs. To support this change, your existing receiver must be modified; please follow these steps to select and implement the proper receiver for your needs.
- Remove the Apsalar Activity. Apsalar no longer requires the com.apsalar.sdk.activity
- Checkout new optional features. Apsalar has introduced a few new features to the Android SDK, including heartbeat control. You can read more about these additions here.
If you have any outstanding questions or concerns regarding the upgrade process, please contact Apsalar's Product Support Team.