mirror of
https://github.com/leanote/leanote-android.git
synced 2025-10-16 23:44:27 +00:00
integrate Flurry
This commit is contained in:
@@ -33,8 +33,19 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
buildTypes.each { buildType ->
|
||||||
|
def properties = new Properties();
|
||||||
|
if (buildType.isDebuggable()) {
|
||||||
|
properties.load(new FileInputStream(new File(projectDir.absolutePath + "/staging.properties")))
|
||||||
|
} else {
|
||||||
|
properties.load(new FileInputStream(new File(projectDir.absolutePath + "/production.properties")))
|
||||||
|
}
|
||||||
|
buildType.buildConfigField "String", "FLURRY_KEY", properties['FLURRY_KEY']
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile fileTree(dir: 'libs', include: ['*.jar'])
|
compile fileTree(dir: 'libs', include: ['*.jar'])
|
||||||
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
|
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
|
||||||
@@ -70,4 +81,5 @@ dependencies {
|
|||||||
compile project(':img-selector')
|
compile project(':img-selector')
|
||||||
compile 'com.facebook.stetho:stetho:1.4.1'
|
compile 'com.facebook.stetho:stetho:1.4.1'
|
||||||
compile 'com.github.houxg:FlexLayout:1.2'
|
compile 'com.github.houxg:FlexLayout:1.2'
|
||||||
|
compile 'com.flurry.android:analytics:6.4.2'
|
||||||
}
|
}
|
||||||
|
1
app/production.properties
Normal file
1
app/production.properties
Normal file
@@ -0,0 +1 @@
|
|||||||
|
FLURRY_KEY="M6HD6WJPT9Y274MG2FSF"
|
@@ -5,6 +5,7 @@ import android.app.Application;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
|
||||||
import com.facebook.stetho.Stetho;
|
import com.facebook.stetho.Stetho;
|
||||||
|
import com.flurry.android.FlurryAgent;
|
||||||
import com.raizlabs.android.dbflow.config.FlowConfig;
|
import com.raizlabs.android.dbflow.config.FlowConfig;
|
||||||
import com.raizlabs.android.dbflow.config.FlowManager;
|
import com.raizlabs.android.dbflow.config.FlowManager;
|
||||||
|
|
||||||
@@ -22,6 +23,9 @@ public class LeanoteLite extends Application {
|
|||||||
public void onCreate() {
|
public void onCreate() {
|
||||||
super.onCreate();
|
super.onCreate();
|
||||||
mContext = this;
|
mContext = this;
|
||||||
|
new FlurryAgent.Builder()
|
||||||
|
.withLogEnabled(true)
|
||||||
|
.build(this, BuildConfig.FLURRY_KEY);
|
||||||
EventBus.builder()
|
EventBus.builder()
|
||||||
.logNoSubscriberMessages(false)
|
.logNoSubscriberMessages(false)
|
||||||
.sendNoSubscriberEvent(false)
|
.sendNoSubscriberEvent(false)
|
||||||
|
1
app/staging.properties
Normal file
1
app/staging.properties
Normal file
@@ -0,0 +1 @@
|
|||||||
|
FLURRY_KEY="XQP2X5N9BCGB7Z5JHS28"
|
Reference in New Issue
Block a user