gentlecat / counter

🔢 Tally counter for Android
https://f-droid.org/repository/browse/?fdid=me.tsukanov.counter
Apache License 2.0
103 stars 53 forks source link

I don't understand CounterApplication Class #81

Closed xee95 closed 4 years ago

xee95 commented 4 years ago

`
public class CounterApplication extends Application { public static String PACKAGE_NAME;

@Inject DispatchingAndroidInjector<Activity> dispatchingAndroidInjector;

private static CounterApplicationComponent component;

@Override
public void onCreate() {
  super.onCreate();

  component =
      DaggerCounterApplicationComponent.builder().counterModule(new 
CounterModule(this)).build();

PACKAGE_NAME = getApplicationContext().getPackageName();
}

public static CounterApplicationComponent getComponent() {
return component;
}
 }`

i don't understand this class, in my project this class is not working any help

gentlecat commented 4 years ago

Take a look at https://developer.android.com/reference/android/app/Application?hl=en.