Commit 486a578a authored by Yusuke Iwaki's avatar Yusuke Iwaki

introduce Instabug

parent 35c077c9
......@@ -32,13 +32,14 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
applicationId "chat.rocket.android"
minSdkVersion 17
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
}
signingConfigs {
release {
......@@ -84,6 +85,11 @@ dependencies {
compile rootProject.ext.supportAppCompat
compile rootProject.ext.supportDesign
compile('com.instabug.library:instabug:3.1.0') {
exclude group: 'io.reactivex'
}
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-core:10.0.0'
compile 'com.google.firebase:firebase-crash:10.0.0'
......
package chat.rocket.android;
import android.app.Application;
import android.support.multidex.MultiDexApplication;
import chat.rocket.android.model.ServerConfig;
import chat.rocket.android.realm_helper.RealmStore;
import com.facebook.stetho.Stetho;
import com.instabug.library.Instabug;
import com.instabug.library.invocation.InstabugInvocationEvent;
import com.uphyca.stetho_realm.RealmInspectorModulesProvider;
import io.realm.Realm;
import io.realm.RealmConfiguration;
......@@ -13,7 +15,7 @@ import timber.log.Timber;
/**
* Customized Application-class for Rocket.Chat
*/
public class RocketChatApplication extends Application {
public class RocketChatApplication extends MultiDexApplication {
@Override public void onCreate() {
super.onCreate();
......@@ -34,6 +36,10 @@ public class RocketChatApplication extends Application {
.enableWebKitInspector(RealmInspectorModulesProvider.builder(this).build())
.build());
new Instabug.Builder(this, getString(R.string.instabug_api_key))
.setInvocationEvent(InstabugInvocationEvent.FLOATING_BUTTON)
.build();
//TODO: add periodic trigger for RocketChatService.keepalive(this) here!
}
}
......@@ -5,7 +5,9 @@ import android.support.annotation.IdRes;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.MotionEvent;
import chat.rocket.android.helper.OnBackPressListener;
import com.instabug.library.InstabugTrackingDelegate;
import com.trello.rxlifecycle.components.support.RxAppCompatActivity;
import icepick.Icepick;
......@@ -62,4 +64,9 @@ abstract class AbstractFragmentActivity extends RxAppCompatActivity {
.addToBackStack(null)
.commit();
}
@Override public boolean dispatchTouchEvent(MotionEvent ev) {
InstabugTrackingDelegate.notifyActivityGotTouchEvent(ev, this);
return super.dispatchTouchEvent(ev);
}
}
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="instabug_api_key">e111b2f9ac16d4eed4a3568cf6270835</string>
</resources>
\ No newline at end of file
......@@ -2,9 +2,10 @@ ext {
androidPlugin = 'com.android.tools.build:gradle:2.2.2'
realmPlugin = 'io.realm:realm-gradle-plugin:2.2.1'
compileSdkVersion = 25
buildToolsVersion = '25.0.0'
buildToolsVersion = '25.0.1'
minSdkVersion = 21 //for accelerating multi-dex build. OVERRIDEN BY Circle CI to 17
supportVersion = '25.0.0'
supportVersion = '25.0.1'
supportAnnotations = "com.android.support:support-annotations:$supportVersion"
supportRecyclerView = "com.android.support:recyclerview-v7:$supportVersion"
supportAppCompat = "com.android.support:appcompat-v7:$supportVersion"
......@@ -19,7 +20,8 @@ subprojects { project ->
project.configurations.all {
resolutionStrategy {
eachDependency { details ->
if (details.requested.group == 'com.android.support') {
if (details.requested.group == 'com.android.support'
&& details.requested.name != "multidex") {
details.useVersion(rootProject.ext.supportVersion)
}
}
......
......@@ -16,7 +16,7 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 16
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode 1
versionName "1"
......
......@@ -14,7 +14,7 @@ android {
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 17
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode 1
versionName "1"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment