forked from organicmaps/organicmaps-tmp
[new downloader][android] add: HockeyApp SDK integrated.
This commit is contained in:
parent
e840a3fa6e
commit
920ea5a35a
5 changed files with 28 additions and 0 deletions
|
@ -29,6 +29,8 @@ dependencies {
|
|||
compile 'com.google.android.gms:play-services-location:8.4.0'
|
||||
compile 'com.google.android.gms:play-services-analytics:8.4.0'
|
||||
compile 'com.google.android.gms:play-services-plus:8.4.0'
|
||||
// crash reporting
|
||||
compile 'net.hockeyapp.android:HockeySDK:3.7.1'
|
||||
// 3-party
|
||||
compile 'com.facebook.android:facebook-android-sdk:4.10.0'
|
||||
compile 'com.parse.bolts:bolts-android:1.4.0'
|
||||
|
|
|
@ -51,4 +51,16 @@ extern "C"
|
|||
{
|
||||
return static_cast<jlong>(AD_PERMISION_CHECK_DURATION);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_mapswithme_maps_PrivateVariables_hockeyAppId(JNIEnv * env, jclass clazz)
|
||||
{
|
||||
return env->NewStringUTF(HOCKEY_APP_KEY);
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL
|
||||
Java_com_mapswithme_maps_PrivateVariables_hockeyAppBetaId(JNIEnv * env, jclass clazz)
|
||||
{
|
||||
return env->NewStringUTF(HOCKEY_APP_BETA_KEY);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,6 +7,7 @@ import android.os.Environment;
|
|||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.File;
|
||||
|
@ -31,6 +32,7 @@ import com.parse.Parse;
|
|||
import com.parse.ParseException;
|
||||
import com.parse.ParseInstallation;
|
||||
import com.parse.SaveCallback;
|
||||
import net.hockeyapp.android.CrashManager;
|
||||
|
||||
public class MwmApplication extends Application
|
||||
{
|
||||
|
@ -103,6 +105,7 @@ public class MwmApplication extends Application
|
|||
nativeInitPlatform(getApkPath(), getDataStoragePath(), getTempPath(), getObbGooglePath(),
|
||||
BuildConfig.FLAVOR, BuildConfig.BUILD_TYPE,
|
||||
Yota.isFirstYota(), UiUtils.isTablet());
|
||||
initHockeyApp();
|
||||
initParse();
|
||||
mPrefs = getSharedPreferences(getString(R.string.pref_file_name), MODE_PRIVATE);
|
||||
mBackgroundTracker = new AppBackgroundTracker();
|
||||
|
@ -158,6 +161,14 @@ public class MwmApplication extends Application
|
|||
nativeAddLocalization("routing_failed_internal_error", getString(R.string.routing_failed_internal_error));
|
||||
}
|
||||
|
||||
private void initHockeyApp()
|
||||
{
|
||||
String id = ("beta".equals(BuildConfig.BUILD_TYPE) ? PrivateVariables.hockeyAppBetaId()
|
||||
: PrivateVariables.hockeyAppId());
|
||||
if (!TextUtils.isEmpty(id))
|
||||
CrashManager.register(this, id);
|
||||
}
|
||||
|
||||
public boolean isFrameworkInitialized()
|
||||
{
|
||||
return mIsFrameworkInitialized;
|
||||
|
|
|
@ -16,4 +16,6 @@ public class PrivateVariables
|
|||
* @return interval in seconds
|
||||
*/
|
||||
public static native long myTargetCheckInterval();
|
||||
public static native String hockeyAppId();
|
||||
public static native String hockeyAppBetaId();
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ else
|
|||
#define AD_PERMISION_SERVER_URL ""
|
||||
#define AD_PERMISION_CHECK_DURATION 2 * 60 * 60
|
||||
#define HOCKEY_APP_KEY ""
|
||||
#define HOCKEY_APP_BETA_KEY ""
|
||||
#define CRASHLYTICS_IOS_KEY ""
|
||||
' > "$PRIVATE_HEADER"
|
||||
echo '
|
||||
|
|
Loading…
Add table
Reference in a new issue