2.0.0 Release
OneSignal Android Native SDK 2.0!
- Network optimizations and offline support for tags, subscription setting, and getTags.
- Added geo tagging.
- Removed loopj library
- Now uses the HttpURLConnection class which is built into the Android OS.
- Smaller SDK size
- Fixed Activity leak.
- Simpler setup, no longer need to add OneSignal.onResumed() and OneSignal.onPaused() to each activity.
- The SDK now handles this for you automatically.
- New builder init pattern.
- OneSignal app id and Google project number now pulled from the AndroidManifest.xml.
- Android Studio users - Set these in the gradle file. See update notes below.
- Now support Android market:// links.
- Now directly opens all links instead of opening your app first.
Updating from 1.x.x
1.
Add the following to your gradle file:
compile 'com.google.android.gms:play-services-location:+'
compile 'com.android.support:appcompat-v7:23.1.1'
`2.` Add `onesignal_app_id` and `onesignal_google_project_number` to your app's gradle file.
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: "b2f7f966-d8cc-11e4-bed1-df8f05be55ba",
onesignal_google_project_number: "703322744261"]
`3.` Move OneSignal initialization to your Application class and use new builder pattern:
OneSignal.startInit(this)
.setAutoPromptLocation(true)
.setNotificationOpenedHandler(new ExampleNotificationOpenedHandler())
.init();
`4.` Remove all calls to OneSignal.onResumed() and OneSignal.onPaused() `5.` Update any calls to GameThrive with OneSignal.
See the all new setup documentation here:
https://documentation.onesignal.com/docs/android-studio-sdk-installation