Check out example codes for "request permission foreground service". It will help you in understanding the concepts better.

Code Example 1

<manifest ...>
     ...
     <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
     ...
     <application ...>
     ...
</manifest>

Learn ReactJs, React Native from akashmittal.com