title: Android ACRA Reporting
body: <p>I am trying to get basic reporting using ACRA in Android Studio in my test app (Lollipop).</p>
  
  <p>So far, I have implemented following:</p>
  
  <ol>
  <li><p>added dependancy in gradle</p>
  
  <pre><code>compile 'ch.acra:acra:4.6.2'
  </code></pre></li>
  <li><p>added MyApplication which extends Application and added ReportsCrashes annotation to it:</p>
  
  <pre><code>@ReportsCrashes(
  
    resNotifTickerText = R.string.crash_notification_ticker_text,
  
    resNotifTitle = R.string.crash_notification_title,
  
    resNotifText = R.string.crash_notification_text,
  
    resNotifIcon = R.mipmap.error );
  
   public class MyApplication extends Application {
  
          private static final String TAG = MyApplication.class.getSimpleName();
  
           @Override
           public void onCreate(){
               super.onCreate();
  
               ACRA.init(this);
           }
       }
  </code></pre></li>
  </ol>
  
  <p>(BTW, sorry for code formatting above, but StackOverflow refused to format it properly for some reason)</p>
  
  <p>This is based on ACRA documentation provided in github <a href="https://github.com/ACRA/acra/wiki/BasicSetup" rel="nofollow">https://github.com/ACRA/acra/wiki/BasicSetup</a></p>
  
  <ol start="3">
  <li><p>added application name and INTERNET permission in AndroidManifest</p>
  
  <p>
  </p>
  
  <pre><code>&lt;!-- add INTERNET permission --&gt;
  &lt;uses-permission android:name="android.permission.INTERNET" /&gt;
  
  &lt;!-- add application name --&gt;
  &lt;application
      android:name="MyApplication"
      android:allowBackup="true"
      android:icon="@mipmap/ic_launcher"
      android:label="@string/app_name"
      android:supportsRtl="true"
      android:theme="@style/AppTheme" &gt;
      &lt;activity android:name=".MainActivity" &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p></li>
  <li><p>My main activity has just one button, when clicked, it will crash app when it attempts to do division by zero</p>
  
  <pre><code> public class MainActivity extends AppCompatActivity {
       public final static String TAG = MainActivity.class.getSimpleName();
  
       private Button btnError;
  
       @Override
       protected void onCreate(Bundle savedInstanceState) {
           super.onCreate(savedInstanceState);
           setContentView(R.layout.activity_main);
  
           btnError = (Button) findViewById(R.id.btnError);
           btnError.setOnClickListener(new View.OnClickListener() {
               @Override
               public void onClick(View v) {
                   Toast.makeText(getApplicationContext(), getString(R.string.toast_app_crash), Toast.LENGTH_SHORT).show();
  
                   Runnable r = new Runnable() {
                       @Override
                       public void run() {
                           // this will crash your app throwing Arithmetic Exception
                           int number = 7 / 0;
                       }
                   };
  
                   Handler h = new Handler();
                   h.postDelayed(r, 2000);
               }
           });
       }
   }
  </code></pre></li>
  </ol>
  
  <p>I am expecting to see some kind of notification and some kind of report to get generated but I dont get any.  My app simply crashes at the spot where division by zero is attempted.</p>
  
  <p>I am not sure what is that I am doing wrong.</p>
  
  <p>Thanks,</p>