Skip to content

Instantly share code, notes, and snippets.

@v-JohnZhang
Created May 6, 2016 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save v-JohnZhang/7180aee8ec47716e411030779bbf5a63 to your computer and use it in GitHub Desktop.
Save v-JohnZhang/7180aee8ec47716e411030779bbf5a63 to your computer and use it in GitHub Desktop.
package com.example.v_zhjoh.androidarcatest;
import android.app.Application;
import android.content.Context;
import android.util.Log;
import org.acra.ACRA;
import org.acra.annotation.ReportsCrashes;
import org.acra.config.ACRAConfiguration;
import org.acra.config.ACRAConfigurationException;
import org.acra.config.ConfigurationBuilder;
import org.acra.sender.ReportSender;
import org.acra.sender.ReportSenderFactory;
/**
* Created by v-zhjoh on 2016/5/4.
*/
@ReportsCrashes(reportSenderFactoryClasses ={HockeySenderFactory.class})
public class MyApplication extends Application
{
@Override
public void onCreate() {
super.onCreate();
}
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
/* Class<?>[] list = new Class<?>[]{HockeySenderFactory.class};
final Class<? extends ReportSenderFactory>[] myReportSenderFactoryClasses = (Class<? extends ReportSenderFactory>[]) list;
final ACRAConfiguration config = new ConfigurationBuilder(this).setReportSenderFactoryClasses(myReportSenderFactoryClasses).build();
ACRA.init(this,config);*/
ACRA.init(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment