Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Google Play crash reporting?

Discussion in 'Scripting' started by ThirdEyeSoftware, Jul 21, 2019.

  1. ThirdEyeSoftware

    ThirdEyeSoftware

    Joined:
    Dec 27, 2017
    Posts:
    3
    Hello,

    I am creating a game in Unity and targeting only Android for now. In the Google Play console, I see you can get reports of crashes and ANRs. (See screenshot at bottom).

    Firstly, how can I get my app to crash (for testing purposes)? I tried throwing an exception in my code, but the app does not crash. Does Unity have some kind of global OnError event that is handling the exception?

    And, once I am able to get my app to crash, will the crash report show up automatically? Or is there some kind of API call I need to do in order to report the crash?


    upload_2019-7-21_6-16-37.png
     
  2. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,664
    Android has a built in crash reporting method that is called when an app is force closed on errors, it will ask the user if they want to submit a bug report. That is the normal way of getting them - and that can take a day or so to process before it shows up in the developer console. I am not aware of a way to force your app to crash and allow you to submit a bug report, but if you had a way to do that, you'd have to upload a version of your app to a testing branch on google play before you could even test it out, which is a bit tedious for a pretend crash... I'd say just make sure you can avoid any possible crashes and errors by testing on a wide variety of devices and android versions.
     
    ThirdEyeSoftware likes this.