Add new app to fabric android

To add a new app to Fabric (now known as Crashlytics) on Android, follow these steps:

Prerequisites:

  1. You have a Fabric account and have set up your Android project in the Fabric dashboard.
  2. You have the Fabric SDK (formerly known as Crashlytics SDK) integrated into your Android app.

Step 1: Create a new app in the Fabric dashboard

  1. Log in to your Fabric account and go to the dashboard.
  2. Click on the "Apps" tab and then click on the "New App" button.
  3. Fill in the required information, such as app name, package name, and API key.
  4. Click "Create App" to create the new app.

Step 2: Add the new app to your Android project

  1. In your Android project, open the build.gradle file and add the following lines to the dependencies block:
    dependencies {
     implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
     implementation 'com.crashlytics.sdk.android:answers:1.4.2'
    }
  2. Sync your project with Gradle by clicking on the "Sync Now" button in the top-right corner of the Android Studio window.

Step 3: Initialize the Fabric SDK in your app

  1. In your app's Application class, add the following code to initialize the Fabric SDK:
    
    import com.crashlytics.android.Crashlytics;
    import com.crashlytics.android.answers.Answers;

public class MyApplication extends Application { @Override public void onCreate() { super.onCreate(); Crashlytics.init(this); Answers.init(this); } }

2. Make sure to add the `MyApplication` class to your app's `AndroidManifest.xml` file:
```xml
<application
   ...
    android:name=".MyApplication"
   ...>
   ...
</application>

Step 4: Set up the Fabric SDK to send data to the new app

  1. In the Fabric dashboard, go to the "Apps" tab and select the new app you created.
  2. Click on the "Settings" tab and scroll down to the "Data" section.
  3. Under "Data", select the "Answers" tab and toggle the "Enabled" switch to the "On" position.
  4. Configure any additional settings as needed, such as data collection frequency or event tracking.

Step 5: Verify the app is set up correctly

  1. Run your app on a device or emulator and verify that the Fabric SDK is sending data to the new app.
  2. Check the Fabric dashboard to see if the app is receiving data and displaying correctly.

That's it! Your new app should now be set up with the Fabric SDK and sending data to the Fabric dashboard.