Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the best ways to crash Android apps?

What are the best ways to cause Android apps to crash? We are trying to make our app as rock solid as possible.

For my own contribution, if you have an app that uses network services, go into your app with wifi connected and then turn off wifi in various ways. For instance, walking out of range, or backgrounding the app and manually shutting wifi off, then foregrounding the app.

like image 308
seibelj Avatar asked Sep 19 '11 17:09

seibelj


People also ask

What is a good crash rate for mobile apps?

Crashes are inevitable in mobile apps. Sometimes it can be coding issues , poor memory management or sometimes device incompatibility. Users do not tolerate crashes well. The acceptable crash rate per user is less than 1%.

What causes an Android game to crash?

This usually occurs when your Wi-Fi or cellular data is slow or unstable, causing apps to malfunction. Another reason for Android apps crashing can be a lack of storage space in your device. This can occur when you overload your device's internal memory with heavy apps.

Does Android have a crash log?

Select an app. On the left menu, select Quality > Android vitals > Crashes and ANRs. Near the center of your screen, use the filters to help you find and diagnose issues. Alternatively, select a cluster to get more details about a specific crash or ANR error.


5 Answers

Start your application, carry out some actions, change the orientation multiple times, exit the application. Repeat the process again and again to discover any hidden memory leaks (use a memory profiler).

Use the monkey to find any possible ab-use cases that you have not considered (although he is not available on some Android devices).

From experience, the best way to really test your application is to find yourself a bunch of beta testers who have not been involved in the project (their actions will make you raise an eyebrow - 'You did what!?').

like image 117
Che Jami Avatar answered Oct 30 '22 18:10

Che Jami


If you are trying to crash intentionally to test services or how the app behaves after a crash then null context it is.

Toast.makeText(null, "Crashed before shown.", Toast.LENGTH_SHORT).show();
like image 42
Helton Malambane Avatar answered Oct 30 '22 17:10

Helton Malambane


You need fast fingers :) just tap very fast on navigation proceed and back buttons, if you have them. I found a lot of crashes using this way.

like image 45
Mania Avatar answered Oct 30 '22 16:10

Mania


I'm listing below the ways of crashing app

  1. Try putting a Toast in thread.
  2. Change orientation while fetching data in RSS feed.
  3. Click Back button while using tabbar. (it crashes in custom tabbar)
  4. Click Back button on TabGroupActivity without overriding back function.
like image 43
Maulik J Avatar answered Oct 30 '22 18:10

Maulik J


In addition to the excellent list by Maulik:

  • change screen orientation in any activity that spawns AsyncTasks

like image 21
Vladimir Ivanov Avatar answered Oct 30 '22 16:10

Vladimir Ivanov