0

I use react-native modules.

I create a java class that extend service to create a foreground notification. Inside my primary module java class i try to start service with :

getReactApplicationContext()
                .startService(
                  new Intent(
                    getReactApplicationContext(),
                    ForegroundService.class
                  )
                );

In android documentation it should call

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

inside my ForegroundService class.

No error are throwing so i believe the service is started without any errors. But this onCreate method is never call. I add <service android:name="com.mediarecorder.ForegroundService"/> already.

Thanks for helping.

I try different context and try to find any solution but no one fit to my question.

Sha
  • 21
  • 2

0 Answers0