remote stack traces

This commit is contained in:
Sergey Solovyev 2012-02-12 20:14:12 +04:00
parent 468e3e12f7
commit 691e94f7a3
5 changed files with 27 additions and 2 deletions

View File

@ -101,7 +101,7 @@
<activity a:name="com.google.ads.AdActivity"
a:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
<service a:name="net.robotmedia.billing.BillingService"/>
<service a:name=".billing.CalculatorBillingService"/>
<receiver a:name="net.robotmedia.billing.BillingReceiver">
<intent-filter>
<action a:name="com.android.vending.billing.IN_APP_NOTIFY"/>

View File

@ -8,4 +8,4 @@
# project structure.
# Project target.
target=android-15
target=android-8

View File

@ -176,6 +176,8 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
CalculatorApplication.registerOnRemoteStackTrace();
final boolean customTitleSupported = requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
final SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);

View File

@ -14,6 +14,7 @@ import net.robotmedia.billing.BillingController;
import org.jetbrains.annotations.NotNull;
import org.solovyev.android.ads.AdsController;
import org.solovyev.android.calculator.model.CalculatorEngine;
import org.solovyev.android.errors.CustomExceptionHandler;
/**
* User: serso
@ -28,6 +29,7 @@ public class CalculatorApplication extends android.app.Application {
public static final String AD_FREE_P_KEY = "org.solovyev.android.calculator_ad_free";
public static final String ADMOB_USER_ID = "a14f02cf9c80cbc";
public static final String REMOTE_STACK_TRACE_URL = "http://calculatorpp.com/crash_reports/upload.php";
@NotNull
private static CalculatorApplication instance;
@ -84,4 +86,8 @@ public class CalculatorApplication extends android.app.Application {
builder.create().show();
}
public static void registerOnRemoteStackTrace() {
Thread.setDefaultUncaughtExceptionHandler(new CustomExceptionHandler(null, REMOTE_STACK_TRACE_URL));
}
}

View File

@ -0,0 +1,17 @@
package org.solovyev.android.calculator.billing;
import net.robotmedia.billing.BillingService;
import org.solovyev.android.calculator.CalculatorApplication;
/**
* User: serso
* Date: 2/12/12
* Time: 1:45 PM
*/
public class CalculatorBillingService extends BillingService {
@Override
public void onCreate() {
super.onCreate();
CalculatorApplication.registerOnRemoteStackTrace();
}
}