Version 3.7.0
With this version, we move the SDK to a Gradle build using Android Studio. The App ID is now loaded from the module's Gradle file and there's no more need to include permissions or activities for our SDK – they are now automatically included through manifest merging.
The new integration looks as follows:
-
Add the dependency to your module:
dependencies { compile 'net.hockeyapp.android:HockeySDK:3.7.0' }
-
Add the manifest placeholder to your module (typically in the
defaultConfig
-closure):defaultConfig { applicationId "com.company.exampleapp" minSdkVersion 9 targetSdkVersion 23 //.... manifestPlaceholders = [HOCKEYAPP_APP_ID: $YOUR_HOCKEYAPP_APP_ID] }
You need to replace
$YOUR_HOCKEYAPP_APP_ID
with your App ID from HockeyApp. -
Add the following meta-data to your module's AndroidManifest.xml:
<meta-data android:name="net.hockeyapp.android.appIdentifier" android:value="${HOCKEYAPP_APP_ID}" />
-
Now you can simply register the managers in your preferred activity:
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Your own code to create the view... UpdateManager.register(this); } @Override protected void onResume() { super.onResume(); CrashManager.register(this); }
Notice how you do not need to provide the App ID to the managers, instead they are retrieved from the manifest automatically. This is particularly handy if you have different product flavors with different App IDs.
Building an AAR also allows us to integrate resources instead of just code. All localized strings are now in the resources directory, so you can easily override them.
Finally, moving to Gradle allowed us to use continuous integration, so every PR you create will now be automatically checked.
Here is the full changelog:
- [NEW] SDK is now built with Gradle in Android Studio
- [NEW]
CrashManager
,UpdateManager
,FeedbackManager
, andLoginManager
have newregister()
-methods which determine the app identifier automatically from the app's manifest - [NEW] Permissions and activities are now automatically added through manifest merging
- [NEW] String resources are now in the
strings.xml
file, so you can override them easily - [NEW] Crashes now include thread name and ID. You can find them in the crash log section in the backend by clicking "View raw log" (#102)
- [NEW] Added German & French localization
- [UPDATE] SDK now targets Android 6.0 (API level 23), requires Android 2.3 (API level 9) as minimum
- [UPDATE] Documentation update on how to use and customize your usage of the SDK, e.g. how to make use of HockeyApp's authentication feature
- [IMPROVEMENT] Moved user interface to resources for more flexibility in the future
- [IMPROVEMENT] Added build checks using Travis CI
- [IMPROVEMENT] Option to prefill feedback UI with the user's name and email (thanks to PR #110)
- [FIX] Fixed several potential issues identified by Lint
- [BUGFIX] Fixed an issue where we couldn't detect if an app was installed from the Play store or through ADB on Xiaomi devices (#99)