title: Use foreground service with Expo and React Native
body: <p>I am using React Native together with Expo to build an app for tracking workouts.
  I want to implement a foreground service for ongoing workouts but also to keep Expo in my project.</p>
  <p>I tried to use this approach: <a href="https://github.com/cristianoccazinsp/react-native-foreground-service" rel="nofollow noreferrer">https://github.com/cristianoccazinsp/react-native-foreground-service</a></p>
  <p>For this, permissions are needed to be added in Android Manifest file, in order to do that, I added the permissions in the app.json file:</p>
  <pre><code>&quot;android&quot;: {
    &quot;adaptiveIcon&quot;: {
      &quot;foregroundImage&quot;: &quot;./assets/adaptive-icon.png&quot;,
      &quot;backgroundColor&quot;: &quot;#FFFFFF&quot;,
      &quot;permissions&quot;: [&quot;FOREGROUND_SERVICE&quot;, &quot;WAKE_LOCK&quot;]
    }
  },
  </code></pre>
  <p>the next step would be to add the service into the Android Manifest file:
  </p>
  <pre><code>&lt;meta-data android:name=&quot;com.zinspector.foregroundservice.notification_channel_name&quot;
              android:value=&quot;zInspector Service&quot;/&gt;
  &lt;meta-data  android:name=&quot;com.zinspector.foregroundservice.notification_channel_description&quot;
              android:value=&quot;zInspector Service.&quot;/&gt;
  &lt;meta-data  android:name=&quot;com.zinspector.foregroundservice.notification_color&quot;
              android:resource=&quot;@color/orange&quot;/&gt;
  
  &lt;service android:name=&quot;com.zinspector.foregroundservice.ForegroundService&quot;&gt;&lt;/service&gt;
  &lt;service android:name=&quot;com.zinspector.foregroundservice.ForegroundServiceTask&quot;&gt;&lt;/service&gt;
  ```
  </code></pre>
  <p>The problem is that I did not find a solution to use expo and add those service properties using app.json</p>
  <p>Could anyone help me with this issue or provide another solution for having a foreground service and keep using Expo ?
  Thank you</p>