Feature “android.hardware.sensor.compass” is not declared in managed workflow.

This is a repost of my unanswered and locked thread

:wave: Hello !
I am building a navigation app for Android with intensive use of the device’s compass. I use the DeviceMotion API from ‘expo-sensors’ in order to get the user’s device orientation relative to the north.

The problem I am facing is that my app appears and is downloadable from the search results of the PlayStore even if the user doesn’t have a compass in its device. But without this sensor, the app simply doesn’t work.

After uploading the .aab bundle to the Google Play console, here is what I see :

The feature android.hardware.sensor.compass is missing. I believe this is due to the line <uses-feature android:name="android.hardware.sensor.compass" android:required="true" /> missing in the generated AndroidManifest.xml file. This is the line responsible of the compatibility check with the user device.

Is there a way to declare the use of this feature in managed workflow, or is this behaviour missing ?

  Expo CLI 4.1.6 environment info:
    System:
      OS: macOS Mojave 10.14.6
      Shell: 5.3 - /bin/zsh
    Binaries:
      Node: 12.18.0 - ~/.nvm/versions/node/v12.18.0/bin/node
      Yarn: 1.17.3 - ~/.yarn/bin/yarn
      npm: 6.14.4 - ~/.nvm/versions/node/v12.18.0/bin/npm
    SDKs:
      iOS SDK:
        Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
      Android SDK:
        API Levels: 28
        Build Tools: 28.0.3, 29.0.3
        System Images: android-22 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom, android-29 | Google APIs Intel x86 Atom
    IDEs:
      Android Studio: 3.6 AI-192.7142.36.36.6241897
      Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
    npmPackages:
      @expo/webpack-config: ~0.12.45 => 0.12.51 
      expo: ^40.0.0 => 40.0.0 
      react: 16.13.1 => 16.13.1 
      react-dom: 16.13.1 => 16.13.1 
      react-native: https://github.com/expo/react-native/archive/sdk-40.0.0.tar.gz => 0.63.2 
      react-native-web: ~0.13.12 => 0.13.18 
    npmGlobalPackages:
      expo-cli: 4.1.6
    Expo Workflow: managed

Hey @baloche, this isn’t something you’ll be able to configure on your own with a Managed workflow project. We’ll have to investigate this but it certainly seems that the compass declaration should be included in the manifest. Is the bare workflow an option for you? That would unblock you until we are able to investigate and roll out a fix if deemed necessary.

Cheers,
Adam

1 Like

The app is not completely ready to be launched on the play store, so it can wait.

:flushed: I just remembered I already created an issue on github in december and I just noticed Evan Bacon submitted a PR. I will keep track of it !
https://github.com/expo/expo-cli/issues/3025

Thanks for your reply

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.