SlideShare una empresa de Scribd logo
1 de 51
Descargar para leer sin conexión
Crashing inCrashing in
About /me
• Tam HANNA
– CEO, Tamoggemon
Ltd.
– Director, Tamoggemon
Holding k.s.
– Runs web sites about
mobile computing
– Writes scientific books
About /girly
• Annette BOSBACH
– Clerk to the
coordinating office,
Tamoggemon Holding
k.s.
– First GottaTxt fan
Overview
• The schedule
• Why track crashes
• Basic methods
• ACRA
Source code
• JAVA Source code is available
– Via Twitter
• Our IP: free to use
– Too low to qualify for protection
– Plus, you have to listen to us so 
The schedule
Crash first, Qt
second• 60% / 40%
– More about Qt: at our booth
• Please tweet about us
The @tamhanna show is co
GottaTxt is the best app at
#droidconnl
After listening to
@tamhanna, my app doesn‘t
crash anymore!!!
@tamhanna threw chocolate on
my head. Ouch! #droidconnl
Why trackWhy track
Market is crowded
• Bad ratings kill an application
• BUT: responding to feedback helps
– „The developer responds to ME!!!“
– I am important
– Ego issues => superhappy customer
Why track crashes?
• Isn‘t it better not to crash?
– Matthew A Brenner, UnME2
• Yes, but
– Ever-increasing number of LOC
– Fragmentation (to see /me mention that )
– Margin pressure
• TU144 / Concorde problem
Users are stupid
• What OS version do you use?
– Common question for developers
– Perceived as denigration by some users
• Send me a file from the file system!
– Common question for developers
– But for developer‘s wife or husband?
Crash vs stat
tracking• Stat tracking
– Which flows are used
– Entry/Exit path analysis
– e.g. Google Analytics
• Crash tracking
– What causes crashes
– Where do users „die“
And there‘s more
• Track „points of pain“ for users
– Rejection of user input
– Games: user death
• Fix them in the next release
– First 2min with application are critical
Private debuggerPrivate debugger
Picture: Wikimedia Commons / fluteflute
What‘s that
• Special mode of operation
– Allows developer access to internals
– ON the users phone
• Can be accessed via secret key
– Must be easy to enter, difficult to guess
– Prevent users from entering it by mistake
• Customer provides info to developer
How to implement
• By foot
• No ready made libraries available
Example
• GottaTxt
1. Open Thread
2. Enter „Secret Code“
3. Enter commands
4. Give response
Try it at our booth
FREE VODKAFREE VODKA
INCLUDED!!!INCLUDED!!!
Basic crashBasic crash
handlinghandling
Wikimedia Commons / David Monack
Really easy way
• Thread.setDefaultExceptionHandler()
• Write to file, then die
• Tell user to email file
– Can usually be accomplished
Problems
• IO is buffered
• Thread terminates before data written
• Data lost
• !!!Occurs rarely!!!
– Never saw it on Android
Non-working
solution• StackOverflow user gupta
• Fire intent from exception handler
• Hope for it to arrive
Non-working
solution - II• Doesn‘t work in practice
• Intent never arrives at application
Workable solution
• Completely override crash handling
– No Android Crash message shown
• Re-invoke application
• Example a360crash1
public ExceptionTrap(Context _context, String _filePath)
{
myContext=_context;
myFilePath=_filePath;
myHandler=Thread.getDefaultUncaughtExceptionHandler();
}
@Override
public void uncaughtException(Thread _t, Throwable _a)
{
try
{
StringWriter s=new StringWriter();
_a.printStackTrace(new PrintWriter(s));
Intent launchIntent=new Intent(ErrorReporter.INTENTSTRING);
launchIntent.putExtra("StackTrace", s.toString());
launchIntent.putExtra("FilePath", myFilePath);
PendingIntent pIntent=PendingIntent.getService(myContext, 0,
launchIntent, launchIntent.getFlags());
AlarmManager mgr = (AlarmManager)
myContext.getSystemService(Context.ALARM_SERVICE);
mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 2000, pIntent);
System.exit(2);
public class ErrorReporter extends IntentService
{
public static final String INTENTSTRING
="com.tamoggemon.a360crash1.intent.CALLERRORREPORTER";
public ErrorReporter()
{
super("TAG");
}
@Override
public void onCreate()
{
super.onCreate();
}
protected void onHandleIntent(Intent intent)
{//Newline, etc removed
try
{
boolean newFile=false;
File writeFile=new File(intent.getStringExtra("FilePath"));
if(writeFile.exists()==false)
{
newFile=true;
writeFile.createNewFile();
}
BufferedWriter buf = new BufferedWriter(new FileWriter(writeFile,
true));
if(newFile)
{
buf.append(android.os.Build.MODEL);
buf.append(android.os.Build.VERSION.RELEASE);
}
buf.append("-------------------CRASH-------------------")
buf.append(intent.getStringExtra("StackTrace"));
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
myTrap=new ExceptionTrap(this, "/sdcard/A360Crash.log");
Thread.setDefaultUncaughtExceptionHandler(myTrap);
setContentView(R.layout.main);
findViewById(R.id.button1).setOnClickListener(this);
}
@Override
public void onClick(View v)
{
throw new RuntimeException("Fehler erfolgreich ausgelöst!");
}
<service android:name=".ErrorReporter">
<intent-filter >
<action
android:name="com.tamoggemon.a360crash1.intent.CALLERROR
REPORTER" />
</intent-filter>
</service>
ACRAACRAWikimedia Commons / gerol
What is ACRA
• Android Crash Report for Android
• Very flexible library
• Can dump crash data to Google Docs
Set up online
• Google Account needed
• Create new form via SpreadSheet
• Export it to get FormKey
Integrate into app
@ReportsCrashes(formKey =
"dExKcElJWjVaUkpMem9WOWg3VE80SlE6MQ")
public class MyApplication extends Application
{
@Override
public void onCreate()
{
ACRA.init(this);
super.onCreate();
}
}
Custom data
• if(v==cmdStoreA)
• {
•
ErrorReporter.getInstance().putCustomData("myVariable
", "A");
• }
• if(v==cmdStoreB)
• {
•
ErrorReporter.getInstance().putCustomData("myVariable
", "B");
• }
Enable / Disable
• if(v==cmdEnable)
• {
• SharedPreferences
aPrefs=ACRA.getACRASharedPreferences();
• Editor anEditor=aPrefs.edit();
• anEditor.putBoolean("acra.enable", true);
• anEditor.commit();
• }
• if(v==cmdDisable)
• {
• SharedPreferences
aPrefs=ACRA.getACRASharedPreferences();
• Editor anEditor=aPrefs.edit();
• anEditor.putBoolean("acra.enable", false);
• anEditor.commit();
• }
Further Options
• ACRA does a LOT
– Interact with users
– Custom databases
• https://github.com/ACRA/acra/wiki/AdvancedUsage
OOP FTW
Problem of all
solutions• Integration requires manual work
– Find all classes
– Integrate logging code
• Better solution: „stub objects“
How to implement it
• By foot
• Loads of leeway for developers
– Abstract actual logging?
Example
public abstract class TMGNActivity extends Activity
{
@Override
public final void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
logThis("Creating Activity");
logThis(getClass().getName());
tmgnOnCreate(savedInstanceState);
}
public abstract void tmgnOnCreate(Bundle savedInstanceState);
Other vendors
Google Play Crash
tracking• Google Play provides crash tracking
– Rudimentary, can‘t add own data
• Better than nothing
– Check often
– Log-in freq. could (!!!) be used for ranking
Crash Trackers
• BugSense
– Specialized service
• Flurry
– Afterthought for premium analytics
• Yours?
– Tell us in Q&A
ConclusionConclusion
Crashes will happen
• Today‘s mobile apps are
– Highly complex
– Underfunded (thanks, Apple!)
• Even the OS crashes sometimes
• Users tolerate reasonable crashingUsers tolerate reasonable crashing
Work-arounds are
needed• Paid users expect frequent updates
– Let them generate their wishes themselves
• Monitoring is first step to improvement
– See what users really think
Olympic spirit
• Important:
– TRACK CRASHES
– Perform PDCA cycle on data
• Not so important
– How to track them
– Track 100% of them
?!?
tamhan@tamoggemon.com
@tamhanna

Más contenido relacionado

La actualidad más candente

Spring Boot and JHipster
Spring Boot and JHipsterSpring Boot and JHipster
Spring Boot and JHipsterEueung Mulyana
 
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...Demi Ben-Ari
 
Java days Lviv 2015
Java days Lviv 2015Java days Lviv 2015
Java days Lviv 2015Alex Theedom
 
Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Matt Raible
 
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019Matt Raible
 
Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Marakana Inc.
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer ToolsWO Community
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University Shashikant Jagtap
 
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)Kelly Shuster
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeedYonatan Levin
 
Choosing a Java Web Framework
Choosing a Java Web FrameworkChoosing a Java Web Framework
Choosing a Java Web FrameworkWill Iverson
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsYakov Fain
 
Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Nicholas Jansma
 
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingDebugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingNicholas Jansma
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumTechday7
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Matt Raible
 

La actualidad más candente (20)

Spring Boot and JHipster
Spring Boot and JHipsterSpring Boot and JHipster
Spring Boot and JHipster
 
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
Monitoring Big Data Systems Done "The Simple Way" - Codemotion Milan 2017 - D...
 
Java days Lviv 2015
Java days Lviv 2015Java days Lviv 2015
Java days Lviv 2015
 
React native
React nativeReact native
React native
 
Android Lab
Android LabAndroid Lab
Android Lab
 
Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019
 
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
Spring Boot APIs and Angular Apps: Get Hip with JHipster! KCDC 2019
 
Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)Learn How to Unit Test Your Android Application (with Robolectric)
Learn How to Unit Test Your Android Application (with Robolectric)
 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer Tools
 
XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University XCUITest Introduction: Test Automation University
XCUITest Introduction: Test Automation University
 
React inter3
React inter3React inter3
React inter3
 
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
Internal Android Library Management (DroidCon SF 2016, Droidcon Italy 2016)
 
A friend in need - A JS indeed
A friend in need - A JS indeedA friend in need - A JS indeed
A friend in need - A JS indeed
 
Choosing a Java Web Framework
Choosing a Java Web FrameworkChoosing a Java Web Framework
Choosing a Java Web Framework
 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
 
Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)Appcelerator Titanium Intro (2014)
Appcelerator Titanium Intro (2014)
 
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingDebugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
Apache Lucene for Java EE Developers
Apache Lucene for Java EE DevelopersApache Lucene for Java EE Developers
Apache Lucene for Java EE Developers
 

Similar a crashing in style

SharePoint logging & debugging
SharePoint logging  & debugging SharePoint logging  & debugging
SharePoint logging & debugging Sentri
 
A look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processingA look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processingMatt Lacey
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?European Collaboration Summit
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamAndreas Grabner
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operationsSunny Neo
 
Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon praguehernanibf
 
Cross-platform logging and analytics
Cross-platform logging and analyticsCross-platform logging and analytics
Cross-platform logging and analyticsDrew Crawford
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Michael Pirnat
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in schoolMichael Galpin
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesVolkan Özçelik
 
Cloud anti-patterns
Cloud anti-patternsCloud anti-patterns
Cloud anti-patternsMallika Iyer
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Volkan Özçelik
 
System hardening - OS and Application
System hardening - OS and ApplicationSystem hardening - OS and Application
System hardening - OS and Applicationedavid2685
 
Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)ClubHack
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToRaymond Camden
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsAndreas Grabner
 

Similar a crashing in style (20)

Into the Box 2018 Building a PWA
Into the Box 2018 Building a PWA Into the Box 2018 Building a PWA
Into the Box 2018 Building a PWA
 
SharePoint logging & debugging
SharePoint logging  & debugging SharePoint logging  & debugging
SharePoint logging & debugging
 
A look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processingA look behind the scenes: Windows 8 background processing
A look behind the scenes: Windows 8 background processing
 
[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?[Pinto] Is my SharePoint Development team properly enlighted?
[Pinto] Is my SharePoint Development team properly enlighted?
 
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 PotsdamFrom Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
From Zero to Performance Hero in Minutes - Agile Testing Days 2014 Potsdam
 
Gamification for cloud computing
Gamification for cloud computingGamification for cloud computing
Gamification for cloud computing
 
Stackato v6
Stackato v6Stackato v6
Stackato v6
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
 
Fix me if you can - DrupalCon prague
Fix me if you can - DrupalCon pragueFix me if you can - DrupalCon prague
Fix me if you can - DrupalCon prague
 
Make it compatible
Make it compatibleMake it compatible
Make it compatible
 
Cross-platform logging and analytics
Cross-platform logging and analyticsCross-platform logging and analytics
Cross-platform logging and analytics
 
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
Shiny, Let’s Be Bad Guys: Exploiting and Mitigating the Top 10 Web App Vulner...
 
Android lessons you won't learn in school
Android lessons you won't learn in schoolAndroid lessons you won't learn in school
Android lessons you won't learn in school
 
External JavaScript Widget Development Best Practices
External JavaScript Widget Development Best PracticesExternal JavaScript Widget Development Best Practices
External JavaScript Widget Development Best Practices
 
Cloud anti-patterns
Cloud anti-patternsCloud anti-patterns
Cloud anti-patterns
 
Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012Java scriptwidgetdevelopmentjstanbul2012
Java scriptwidgetdevelopmentjstanbul2012
 
System hardening - OS and Application
System hardening - OS and ApplicationSystem hardening - OS and Application
System hardening - OS and Application
 
Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)Metasploitation part-1 (murtuja)
Metasploitation part-1 (murtuja)
 
Building a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared ToBuilding a PWA - For Everyone Who Is Scared To
Building a PWA - For Everyone Who Is Scared To
 
DevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback LoopsDevOps Pipelines and Metrics Driven Feedback Loops
DevOps Pipelines and Metrics Driven Feedback Loops
 

Más de Droidcon Berlin

Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limitsDroidcon Berlin
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility Droidcon Berlin
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_backDroidcon Berlin
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86Droidcon Berlin
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building AndroidDroidcon Berlin
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentationDroidcon Berlin
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Droidcon Berlin
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkraussDroidcon Berlin
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014Droidcon Berlin
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Droidcon Berlin
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidconDroidcon Berlin
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devicesDroidcon Berlin
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradioDroidcon Berlin
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon Berlin
 
Droidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenbergDroidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenbergDroidcon Berlin
 
Droidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedekeDroidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedekeDroidcon Berlin
 

Más de Droidcon Berlin (20)

Android programming -_pushing_the_limits
Android programming -_pushing_the_limitsAndroid programming -_pushing_the_limits
Android programming -_pushing_the_limits
 
Raspberry Pi
Raspberry PiRaspberry Pi
Raspberry Pi
 
Android industrial mobility
Android industrial mobility Android industrial mobility
Android industrial mobility
 
Details matter in ux
Details matter in uxDetails matter in ux
Details matter in ux
 
From sensor data_to_android_and_back
From sensor data_to_android_and_backFrom sensor data_to_android_and_back
From sensor data_to_android_and_back
 
droidparts
droidpartsdroidparts
droidparts
 
new_age_graphics_android_x86
new_age_graphics_android_x86new_age_graphics_android_x86
new_age_graphics_android_x86
 
5 tips of monetization
5 tips of monetization5 tips of monetization
5 tips of monetization
 
Testing and Building Android
Testing and Building AndroidTesting and Building Android
Testing and Building Android
 
Matchinguu droidcon presentation
Matchinguu droidcon presentationMatchinguu droidcon presentation
Matchinguu droidcon presentation
 
Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3Cgm life sdk_droidcon_2014_v3
Cgm life sdk_droidcon_2014_v3
 
The artofcalabash peterkrauss
The artofcalabash peterkraussThe artofcalabash peterkrauss
The artofcalabash peterkrauss
 
Raesch, gries droidcon 2014
Raesch, gries   droidcon 2014Raesch, gries   droidcon 2014
Raesch, gries droidcon 2014
 
Android open gl2_droidcon_2014
Android open gl2_droidcon_2014Android open gl2_droidcon_2014
Android open gl2_droidcon_2014
 
20140508 quantified self droidcon
20140508 quantified self droidcon20140508 quantified self droidcon
20140508 quantified self droidcon
 
Tuning android for low ram devices
Tuning android for low ram devicesTuning android for low ram devices
Tuning android for low ram devices
 
Froyo to kit kat two years developing & maintaining deliradio
Froyo to kit kat   two years developing & maintaining deliradioFroyo to kit kat   two years developing & maintaining deliradio
Froyo to kit kat two years developing & maintaining deliradio
 
Droidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicroDroidcon2013 security genes_trendmicro
Droidcon2013 security genes_trendmicro
 
Droidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenbergDroidcon2013 commercialsuccess rannenberg
Droidcon2013 commercialsuccess rannenberg
 
Droidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedekeDroidcon2013 bootstrap luedeke
Droidcon2013 bootstrap luedeke
 

Último

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 

Último (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 

crashing in style

  • 2. About /me • Tam HANNA – CEO, Tamoggemon Ltd. – Director, Tamoggemon Holding k.s. – Runs web sites about mobile computing – Writes scientific books
  • 3. About /girly • Annette BOSBACH – Clerk to the coordinating office, Tamoggemon Holding k.s. – First GottaTxt fan
  • 4. Overview • The schedule • Why track crashes • Basic methods • ACRA
  • 5. Source code • JAVA Source code is available – Via Twitter • Our IP: free to use – Too low to qualify for protection – Plus, you have to listen to us so 
  • 7. Crash first, Qt second• 60% / 40% – More about Qt: at our booth • Please tweet about us
  • 8. The @tamhanna show is co GottaTxt is the best app at #droidconnl After listening to @tamhanna, my app doesn‘t crash anymore!!! @tamhanna threw chocolate on my head. Ouch! #droidconnl
  • 10. Market is crowded • Bad ratings kill an application • BUT: responding to feedback helps – „The developer responds to ME!!!“ – I am important – Ego issues => superhappy customer
  • 11. Why track crashes? • Isn‘t it better not to crash? – Matthew A Brenner, UnME2 • Yes, but – Ever-increasing number of LOC – Fragmentation (to see /me mention that ) – Margin pressure • TU144 / Concorde problem
  • 12. Users are stupid • What OS version do you use? – Common question for developers – Perceived as denigration by some users • Send me a file from the file system! – Common question for developers – But for developer‘s wife or husband?
  • 13. Crash vs stat tracking• Stat tracking – Which flows are used – Entry/Exit path analysis – e.g. Google Analytics • Crash tracking – What causes crashes – Where do users „die“
  • 14. And there‘s more • Track „points of pain“ for users – Rejection of user input – Games: user death • Fix them in the next release – First 2min with application are critical
  • 15. Private debuggerPrivate debugger Picture: Wikimedia Commons / fluteflute
  • 16. What‘s that • Special mode of operation – Allows developer access to internals – ON the users phone • Can be accessed via secret key – Must be easy to enter, difficult to guess – Prevent users from entering it by mistake • Customer provides info to developer
  • 17. How to implement • By foot • No ready made libraries available
  • 18. Example • GottaTxt 1. Open Thread 2. Enter „Secret Code“ 3. Enter commands 4. Give response
  • 19. Try it at our booth FREE VODKAFREE VODKA INCLUDED!!!INCLUDED!!!
  • 21. Really easy way • Thread.setDefaultExceptionHandler() • Write to file, then die • Tell user to email file – Can usually be accomplished
  • 22. Problems • IO is buffered • Thread terminates before data written • Data lost • !!!Occurs rarely!!! – Never saw it on Android
  • 23. Non-working solution• StackOverflow user gupta • Fire intent from exception handler • Hope for it to arrive
  • 24. Non-working solution - II• Doesn‘t work in practice • Intent never arrives at application
  • 25. Workable solution • Completely override crash handling – No Android Crash message shown • Re-invoke application • Example a360crash1
  • 26. public ExceptionTrap(Context _context, String _filePath) { myContext=_context; myFilePath=_filePath; myHandler=Thread.getDefaultUncaughtExceptionHandler(); }
  • 27. @Override public void uncaughtException(Thread _t, Throwable _a) { try { StringWriter s=new StringWriter(); _a.printStackTrace(new PrintWriter(s)); Intent launchIntent=new Intent(ErrorReporter.INTENTSTRING); launchIntent.putExtra("StackTrace", s.toString()); launchIntent.putExtra("FilePath", myFilePath); PendingIntent pIntent=PendingIntent.getService(myContext, 0, launchIntent, launchIntent.getFlags()); AlarmManager mgr = (AlarmManager) myContext.getSystemService(Context.ALARM_SERVICE); mgr.set(AlarmManager.RTC, System.currentTimeMillis() + 2000, pIntent); System.exit(2);
  • 28. public class ErrorReporter extends IntentService { public static final String INTENTSTRING ="com.tamoggemon.a360crash1.intent.CALLERRORREPORTER"; public ErrorReporter() { super("TAG"); } @Override public void onCreate() { super.onCreate(); }
  • 29. protected void onHandleIntent(Intent intent) {//Newline, etc removed try { boolean newFile=false; File writeFile=new File(intent.getStringExtra("FilePath")); if(writeFile.exists()==false) { newFile=true; writeFile.createNewFile(); } BufferedWriter buf = new BufferedWriter(new FileWriter(writeFile, true)); if(newFile) { buf.append(android.os.Build.MODEL); buf.append(android.os.Build.VERSION.RELEASE); } buf.append("-------------------CRASH-------------------") buf.append(intent.getStringExtra("StackTrace"));
  • 30. public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); myTrap=new ExceptionTrap(this, "/sdcard/A360Crash.log"); Thread.setDefaultUncaughtExceptionHandler(myTrap); setContentView(R.layout.main); findViewById(R.id.button1).setOnClickListener(this); } @Override public void onClick(View v) { throw new RuntimeException("Fehler erfolgreich ausgelöst!"); }
  • 33. What is ACRA • Android Crash Report for Android • Very flexible library • Can dump crash data to Google Docs
  • 34. Set up online • Google Account needed • Create new form via SpreadSheet • Export it to get FormKey
  • 35. Integrate into app @ReportsCrashes(formKey = "dExKcElJWjVaUkpMem9WOWg3VE80SlE6MQ") public class MyApplication extends Application { @Override public void onCreate() { ACRA.init(this); super.onCreate(); } }
  • 36. Custom data • if(v==cmdStoreA) • { • ErrorReporter.getInstance().putCustomData("myVariable ", "A"); • } • if(v==cmdStoreB) • { • ErrorReporter.getInstance().putCustomData("myVariable ", "B"); • }
  • 37. Enable / Disable • if(v==cmdEnable) • { • SharedPreferences aPrefs=ACRA.getACRASharedPreferences(); • Editor anEditor=aPrefs.edit(); • anEditor.putBoolean("acra.enable", true); • anEditor.commit(); • } • if(v==cmdDisable) • { • SharedPreferences aPrefs=ACRA.getACRASharedPreferences(); • Editor anEditor=aPrefs.edit(); • anEditor.putBoolean("acra.enable", false); • anEditor.commit(); • }
  • 38. Further Options • ACRA does a LOT – Interact with users – Custom databases • https://github.com/ACRA/acra/wiki/AdvancedUsage
  • 40. Problem of all solutions• Integration requires manual work – Find all classes – Integrate logging code • Better solution: „stub objects“
  • 41.
  • 42. How to implement it • By foot • Loads of leeway for developers – Abstract actual logging?
  • 43. Example public abstract class TMGNActivity extends Activity { @Override public final void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); logThis("Creating Activity"); logThis(getClass().getName()); tmgnOnCreate(savedInstanceState); } public abstract void tmgnOnCreate(Bundle savedInstanceState);
  • 45. Google Play Crash tracking• Google Play provides crash tracking – Rudimentary, can‘t add own data • Better than nothing – Check often – Log-in freq. could (!!!) be used for ranking
  • 46. Crash Trackers • BugSense – Specialized service • Flurry – Afterthought for premium analytics • Yours? – Tell us in Q&A
  • 48. Crashes will happen • Today‘s mobile apps are – Highly complex – Underfunded (thanks, Apple!) • Even the OS crashes sometimes • Users tolerate reasonable crashingUsers tolerate reasonable crashing
  • 49. Work-arounds are needed• Paid users expect frequent updates – Let them generate their wishes themselves • Monitoring is first step to improvement – See what users really think
  • 50. Olympic spirit • Important: – TRACK CRASHES – Perform PDCA cycle on data • Not so important – How to track them – Track 100% of them