Fix plugins
This commit is contained in:
parent
b85edcbb63
commit
976594927d
9 changed files with 50 additions and 26 deletions
|
@ -62,12 +62,18 @@ repositories {
|
|||
}
|
||||
}
|
||||
|
||||
def analytics = System.getenv("USE_FIREBASE_FOR_PLUGINS")
|
||||
|
||||
dependencies {
|
||||
//compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
//compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
if (analytics) {
|
||||
compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:23.3.0'
|
||||
compile 'com.android.support:design:23.3.0'
|
||||
}
|
||||
|
||||
//println "Apply GMS plugin"
|
||||
//apply plugin: 'com.google.gms.google-services'
|
||||
if (analytics) {
|
||||
println "Apply GMS plugin"
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
||||
|
|
|
@ -72,16 +72,16 @@ public class NauticalActivity extends Activity {
|
|||
}
|
||||
|
||||
public void logEvent(Activity ctx, String event) {
|
||||
/*
|
||||
try {
|
||||
Class<?> cl = Class.forName("com.google.firebase.analytics.FirebaseAnalytics");
|
||||
Method mm = cl.getMethod("getInstance", Context.class);
|
||||
Object inst = mm.invoke(null, ctx == null ? this : ctx);
|
||||
Method log = cl.getMethod("logEvent", String.class, Bundle.class);
|
||||
log.invoke(inst, event, new Bundle());
|
||||
} catch (ClassNotFoundException e) {
|
||||
//ignore
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
|
@ -62,12 +62,18 @@ repositories {
|
|||
}
|
||||
}
|
||||
|
||||
def analytics = System.getenv("USE_FIREBASE_FOR_PLUGINS")
|
||||
|
||||
dependencies {
|
||||
//compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
//compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
if (analytics) {
|
||||
compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:23.3.0'
|
||||
compile 'com.android.support:design:23.3.0'
|
||||
}
|
||||
|
||||
//println "Apply GMS plugin"
|
||||
//apply plugin: 'com.google.gms.google-services'
|
||||
if (analytics) {
|
||||
println "Apply GMS plugin"
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
||||
|
|
|
@ -71,16 +71,16 @@ public class ParkingPluginActivity extends Activity {
|
|||
}
|
||||
|
||||
public void logEvent(Activity ctx, String event) {
|
||||
/*
|
||||
try {
|
||||
Class<?> cl = Class.forName("com.google.firebase.analytics.FirebaseAnalytics");
|
||||
Method mm = cl.getMethod("getInstance", Context.class);
|
||||
Object inst = mm.invoke(null, ctx == null ? this : ctx);
|
||||
Method log = cl.getMethod("logEvent", String.class, Bundle.class);
|
||||
log.invoke(inst, event, new Bundle());
|
||||
} catch (ClassNotFoundException e) {
|
||||
//ignore
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
|
@ -62,12 +62,18 @@ repositories {
|
|||
}
|
||||
}
|
||||
|
||||
def analytics = System.getenv("USE_FIREBASE_FOR_PLUGINS")
|
||||
|
||||
dependencies {
|
||||
//compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
//compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
if (analytics) {
|
||||
compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:23.3.0'
|
||||
compile 'com.android.support:design:23.3.0'
|
||||
}
|
||||
|
||||
//println "Apply GMS plugin"
|
||||
//apply plugin: 'com.google.gms.google-services'
|
||||
if (analytics) {
|
||||
println "Apply GMS plugin"
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
||||
|
|
|
@ -73,16 +73,16 @@ public class SRTMPluginActivity extends Activity {
|
|||
}
|
||||
|
||||
public void logEvent(Activity ctx, String event) {
|
||||
/*
|
||||
try {
|
||||
Class<?> cl = Class.forName("com.google.firebase.analytics.FirebaseAnalytics");
|
||||
Method mm = cl.getMethod("getInstance", Context.class);
|
||||
Object inst = mm.invoke(null, ctx == null ? this : ctx);
|
||||
Method log = cl.getMethod("logEvent", String.class, Bundle.class);
|
||||
log.invoke(inst, event, new Bundle());
|
||||
} catch (ClassNotFoundException e) {
|
||||
//ignore
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
|
@ -15,12 +15,12 @@
|
|||
android:name="net.osmand.skimaps.SkiMapsActivity"
|
||||
android:theme="@style/AppTheme"
|
||||
android:label="@string/app_name" >
|
||||
<!--
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
-->
|
||||
|
||||
</activity>
|
||||
</application>
|
||||
|
||||
|
|
|
@ -63,12 +63,18 @@ repositories {
|
|||
}
|
||||
}
|
||||
|
||||
def analytics = System.getenv("USE_FIREBASE_FOR_PLUGINS")
|
||||
|
||||
dependencies {
|
||||
//compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
//compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
if (analytics) {
|
||||
compile 'com.google.firebase:firebase-core:9.8.0'
|
||||
compile 'com.google.firebase:firebase-config:9.8.0'
|
||||
}
|
||||
compile 'com.android.support:appcompat-v7:23.3.0'
|
||||
compile 'com.android.support:design:23.3.0'
|
||||
}
|
||||
|
||||
//println "Apply GMS plugin"
|
||||
//apply plugin: 'com.google.gms.google-services'
|
||||
if (analytics) {
|
||||
println "Apply GMS plugin"
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
}
|
||||
|
|
|
@ -74,16 +74,16 @@ public class SkiMapsActivity extends Activity {
|
|||
}
|
||||
|
||||
public void logEvent(Activity ctx, String event) {
|
||||
/*
|
||||
try {
|
||||
Class<?> cl = Class.forName("com.google.firebase.analytics.FirebaseAnalytics");
|
||||
Method mm = cl.getMethod("getInstance", Context.class);
|
||||
Object inst = mm.invoke(null, ctx == null ? this : ctx);
|
||||
Method log = cl.getMethod("logEvent", String.class, Bundle.class);
|
||||
log.invoke(inst, event, new Bundle());
|
||||
} catch (ClassNotFoundException e) {
|
||||
//ignore
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue