react-native-background-geolocation: Android App crashes

Plugin version:

  • “react-native-background-fetch”: “^2.4.6”,
  • “react-native-background-geolocation”: “^2.14.2”,

Platform: Android

  • OS version: 8.0.0
  • Device manufacturer / model: Samsung Galaxy S7
  • React Native version (react-native -v): 0.51.0

Actual Result:

Android app crash by throwing below error:

=============================================== Javascript code I am using with the plugin:

const configureBackgroundGeolocation = () => {
  
  // Step 1:  Listen to events:
  BackgroundGeolocation.onLocation(onLocation, onLocationError);
  BackgroundGeolocation.onHeartbeat(onHeartbeat);
  
  // Step 2:  #ready:
  BackgroundGeolocation.ready({
      reset: true,
      debug: true,
      stopOnTerminate: true,
      desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
      logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
      foregroundService: true,
      autoSync: true,
      stopOnTerminate: false,
      startOnBoot: true,
      heartbeatInterval: 60,
      enableHeadless: true,
      distanceFilter: 10
    }, state => {
      BackgroundGeolocation.start().then((state) => {
        console.log('[start] success - ', state);
      });
      }, error => {
        console.warn('BackgroundGeolocation error: ', error)
    });
};
 
const onLocation = (location) => {
    console.log('[location] - ', location);
}

const onLocationError = (errorCode) => {
    console.log('[location] ERROR - ', errorCode);
}

const onHeartbeat = params => {
    console.log("[heartbeat] - ", params.location);
}

Logcat

01-22 13:56:31.418 21421 21760 E AndroidRuntime: FATAL EXCEPTION: ThreadUtils.lowPriority #0
01-22 13:56:31.418 21421 21760 E AndroidRuntime: Process: com.android.vending, PID: 21421
01-22 13:56:31.418 21421 21760 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at android.os.AsyncTask$3.done(AsyncTask.java:353)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:271)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at com.google.android.finsky.utils.br.run(Unknown Source:3)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:764)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: Caused by: java.lang.SecurityException: openWrite not allowed after commit
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1959)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at android.os.Parcel.readException(Parcel.java:1905)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at android.content.pm.IPackageInstallerSession$Stub$Proxy.openWrite(IPackageInstallerSession.java:221)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at android.content.pm.PackageInstaller$Session.openWrite(PackageInstaller.java:768)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at com.google.android.finsky.du.j.a(SourceFile:94)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at com.google.android.finsky.bk.d.g(SourceFile:5)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at com.google.android.finsky.apkprocessor.l.a(SourceFile:19)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at com.google.android.finsky.apkprocessor.l.doInBackground(SourceFile:85)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at android.os.AsyncTask$2.call(AsyncTask.java:333)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
01-22 13:56:31.418 21421 21760 E AndroidRuntime: 	... 4 more
01-22 13:57:33.948 22117 22117 E AndroidRuntime: FATAL EXCEPTION: main
01-22 13:57:33.948 22117 22117 E AndroidRuntime: Process: com.testapp, PID: 22117
01-22 13:57:33.948 22117 22117 E AndroidRuntime: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.testapp/com.intentfilter.androidpermissions.PermissionsActivity}; have you declared this activity in your AndroidManifest.xml?

Dependencies

debugApi - API dependencies for 'debug' sources. (n)
No dependencies

debugApiElements - API elements for debug (n)
No dependencies

debugApk - Apk dependencies for 'debug' sources (deprecated: use 'debugRuntimeOnly' instead). (n)
No dependencies

debugCompile - Compile dependencies for 'debug' sources (deprecated: use 'debugImplementation' instead). (n)
No dependencies

debugCompileClasspath - Resolved configuration for compilation for variant: debug
+--- project :react-native-background-fetch
|    +--- com.facebook.react:react-native:+ -> 0.51.0
|    |    +--- javax.inject:javax.inject:1
|    |    +--- com.android.support:appcompat-v7:23.0.1 -> 26.1.0
|    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    +--- com.android.support:support-v4:26.1.0
|    |    |    |    +--- com.android.support:support-compat:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- android.arch.lifecycle:runtime:1.0.0
|    |    |    |    |         +--- android.arch.lifecycle:common:1.0.0
|    |    |    |    |         \--- android.arch.core:common:1.0.0
|    |    |    |    +--- com.android.support:support-media-compat:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |    +--- com.android.support:support-core-utils:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |    +--- com.android.support:support-core-ui:26.1.0
|    |    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |    \--- com.android.support:support-fragment:26.1.0
|    |    |    |         +--- com.android.support:support-compat:26.1.0 (*)
|    |    |    |         +--- com.android.support:support-core-ui:26.1.0 (*)
|    |    |    |         \--- com.android.support:support-core-utils:26.1.0 (*)
|    |    |    +--- com.android.support:support-vector-drawable:26.1.0
|    |    |    |    +--- com.android.support:support-annotations:26.1.0
|    |    |    |    \--- com.android.support:support-compat:26.1.0 (*)
|    |    |    \--- com.android.support:animated-vector-drawable:26.1.0
|    |    |         +--- com.android.support:support-vector-drawable:26.1.0 (*)
|    |    |         \--- com.android.support:support-core-ui:26.1.0 (*)
|    |    +--- com.facebook.fbui.textlayoutbuilder:textlayoutbuilder:1.0.0
|    |    |    \--- com.facebook.fbui.textlayoutbuilder:staticlayout-proxy:1.0
|    |    +--- com.facebook.fresco:fresco:1.3.0
|    |    |    +--- com.facebook.fresco:drawee:1.3.0
|    |    |    |    \--- com.facebook.fresco:fbcore:1.3.0
|    |    |    +--- com.facebook.fresco:fbcore:1.3.0
|    |    |    \--- com.facebook.fresco:imagepipeline:1.3.0
|    |    |         +--- com.parse.bolts:bolts-tasks:1.4.0
|    |    |         +--- com.facebook.fresco:fbcore:1.3.0
|    |    |         \--- com.facebook.fresco:imagepipeline-base:1.3.0
|    |    |              +--- com.parse.bolts:bolts-tasks:1.4.0
|    |    |              \--- com.facebook.fresco:fbcore:1.3.0
|    |    +--- com.facebook.fresco:imagepipeline-okhttp3:1.3.0
|    |    |    +--- com.squareup.okhttp3:okhttp:3.6.0 -> 3.10.0
|    |    |    |    \--- com.squareup.okio:okio:1.14.0
|    |    |    +--- com.facebook.fresco:fbcore:1.3.0
|    |    |    \--- com.facebook.fresco:imagepipeline:1.3.0 (*)
|    |    +--- com.facebook.soloader:soloader:0.1.0
|    |    +--- com.google.code.findbugs:jsr305:3.0.0
|    |    +--- com.squareup.okhttp3:okhttp:3.6.0 -> 3.10.0 (*)
|    |    +--- com.squareup.okhttp3:okhttp-urlconnection:3.6.0
|    |    |    \--- com.squareup.okhttp3:okhttp:3.6.0 -> 3.10.0 (*)
|    |    +--- com.squareup.okio:okio:1.13.0 -> 1.14.0
|    |    \--- org.webkit:android-jsc:r174650
|    \--- com.transistorsoft:tsbackgroundfetch:+ -> 0.2.0
+--- project :react-native-background-geolocation
|    +--- com.facebook.react:react-native:+ -> 0.51.0 (*)
|    +--- com.google.android.gms:play-services-location:16.0.0
|    |    +--- com.google.android.gms:play-services-base:16.0.1
|    |    |    +--- com.google.android.gms:play-services-basement:16.0.1
|    |    |    |    \--- com.android.support:support-v4:26.1.0 (*)
|    |    |    \--- com.google.android.gms:play-services-tasks:16.0.1
|    |    |         \--- com.google.android.gms:play-services-basement:16.0.1 (*)
|    |    +--- com.google.android.gms:play-services-basement:16.0.1 (*)
|    |    +--- com.google.android.gms:play-services-places-placereport:16.0.0
|    |    |    \--- com.google.android.gms:play-services-basement:16.0.1 (*)
|    |    \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
|    +--- org.greenrobot:eventbus:3.0.0
|    +--- com.squareup.okhttp3:okhttp:3.10.0 (*)
|    +--- com.transistorsoft:tslocationmanager:+ -> 2.14.4
|    +--- org.slf4j:slf4j-api:1.7.21
|    +--- com.github.tony19:logback-android:1.1.1-9
|    |    \--- com.github.tony19:apktool-lib:1.4.4-5
|    \--- com.intentfilter:android-permissions:0.1.6
+--- project :react-native-linear-gradient
+--- project :react-native-google-signin
+--- project :react-native-cookie
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-maps
+--- project :react-native-svg
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-video
|    +--- com.google.android.exoplayer:exoplayer:2.7.3
|    |    +--- com.google.android.exoplayer:exoplayer-core:2.7.3
|    |    |    \--- com.android.support:support-annotations:27.0.0 -> 26.1.0
|    |    +--- com.google.android.exoplayer:exoplayer-dash:2.7.3
|    |    |    +--- com.google.android.exoplayer:exoplayer-core:2.7.3 (*)
|    |    |    \--- com.android.support:support-annotations:27.0.0 -> 26.1.0
|    |    +--- com.google.android.exoplayer:exoplayer-hls:2.7.3
|    |    |    +--- com.android.support:support-annotations:27.0.0 -> 26.1.0
|    |    |    \--- com.google.android.exoplayer:exoplayer-core:2.7.3 (*)
|    |    +--- com.google.android.exoplayer:exoplayer-smoothstreaming:2.7.3
|    |    |    +--- com.google.android.exoplayer:exoplayer-core:2.7.3 (*)
|    |    |    \--- com.android.support:support-annotations:27.0.0 -> 26.1.0
|    |    \--- com.google.android.exoplayer:exoplayer-ui:2.7.3
|    |         +--- com.google.android.exoplayer:exoplayer-core:2.7.3 (*)
|    |         \--- com.android.support:support-annotations:27.0.0 -> 26.1.0
|    +--- com.google.android.exoplayer:extension-okhttp:2.7.3
|    |    +--- com.google.android.exoplayer:exoplayer-core:2.7.3 (*)
|    |    \--- com.android.support:support-annotations:27.0.0 -> 26.1.0
|    \--- com.squareup.okhttp3:okhttp:3.9.1 -> 3.10.0 (*)
+--- project :react-native-document-picker
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-orientation
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-device-info
|    +--- com.facebook.react:react-native:+ -> 0.51.0 (*)
|    \--- com.google.android.gms:play-services-gcm:+ -> 16.0.0
|         +--- com.google.android.gms:play-services-base:16.0.1 (*)
|         +--- com.google.android.gms:play-services-basement:16.0.1 (*)
|         +--- com.google.android.gms:play-services-iid:16.0.0
|         |    +--- com.google.android.gms:play-services-base:16.0.1 (*)
|         |    +--- com.google.android.gms:play-services-basement:16.0.1 (*)
|         |    +--- com.google.android.gms:play-services-stats:16.0.1
|         |    |    \--- com.google.android.gms:play-services-basement:16.0.1 (*)
|         |    \--- com.google.android.gms:play-services-tasks:16.0.1 (*)
|         \--- com.google.android.gms:play-services-stats:16.0.1 (*)
+--- project :react-native-view-shot
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-config
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :@terrylinla/react-native-sketch-canvas
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-android-location-services-dialog-box
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-connectivity-status
+--- project :react-native-geolocation-service
|    \--- com.android.support:appcompat-v7:25.0.1 -> 26.1.0 (*)
+--- project :rn-fetch-blob
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-fs
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-image-picker
|    \--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- project :react-native-camera
+--- project :react-native-mixpanel
|    +--- com.facebook.react:react-native:+ -> 0.51.0 (*)
|    \--- com.mixpanel.android:mixpanel-android:5.3.0
+--- com.android.support:appcompat-v7:25.3.1 -> 26.1.0 (*)
+--- com.facebook.react:react-native:+ -> 0.51.0 (*)
+--- com.google.android.gms:play-services-location:15.0.1 -> 16.0.0 (*)
+--- com.google.android.gms:play-services-vision:15.0.1
|    +--- com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 16.0.1 (*)
|    +--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 16.0.1 (*)
|    \--- com.google.android.gms:play-services-vision-common:[15.0.1] -> 15.0.1
|         +--- com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 16.0.1 (*)
|         +--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 16.0.1 (*)
|         +--- com.google.android.gms:play-services-clearcut:[15.0.1,16.0.0) -> 15.0.1
|         |    +--- com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 16.0.1 (*)
|         |    +--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 16.0.1 (*)
|         |    +--- com.google.android.gms:play-services-phenotype:[15.0.1,16.0.0) -> 15.0.1
|         |    |    +--- com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 16.0.1 (*)
|         |    |    +--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 16.0.1 (*)
|         |    |    \--- com.google.android.gms:play-services-tasks:[15.0.1,16.0.0) -> 16.0.1 (*)
|         |    \--- com.google.android.gms:play-services-tasks:[15.0.1,16.0.0) -> 16.0.1 (*)
|         \--- com.google.android.gms:play-services-flags:[15.0.1,16.0.0) -> 15.0.1
|              +--- com.google.android.gms:play-services-base:[15.0.1] -> 16.0.1 (*)
|              \--- com.google.android.gms:play-services-basement:[15.0.1] -> 16.0.1 (*)
+--- com.google.android.gms:play-services-maps:15.0.1
|    +--- com.google.android.gms:play-services-base:[15.0.1,16.0.0) -> 16.0.1 (*)
|    \--- com.google.android.gms:play-services-basement:[15.0.1,16.0.0) -> 16.0.1 (*)
+--- com.google.android.gms:play-services-tasks:15.0.1 -> 16.0.1 (*)
\--- com.android.support:multidex:1.0.2

Gradle

  • android/build.gradle
buildscript {
    ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 27
        targetSdkVersion = 27
        supportLibVersion = "27.1.1"
        googlePlayServicesAuthVersion = '15.0.1'
    }
    repositories {
        google()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.google.gms:google-services:3.2.1'
    }
}

subprojects {
   afterEvaluate {project ->
       if (project.hasProperty("android")) {
           android {
               compileSdkVersion 26
               buildToolsVersion '26.0.1'
           }
       }
   }
}

allprojects {
    repositories {
        mavenLocal()
        google()
        maven {
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        maven {
            url "$rootDir/../node_modules/react-native-background-geolocation/android/libs"
            }
        maven {
            url "$rootDir/../node_modules/react-native-background-fetch/android/libs"
        }
        mavenCentral()
        jcenter()
    }
}

subprojects {
  project.configurations.all {
     resolutionStrategy.eachDependency { details ->
        if (details.requested.group == 'com.android.support'
              && !details.requested.name.contains('multidex') ) {
           details.useVersion "26.1.0"
        }
     }
  }
}
  • android/app/build.gradle
apply plugin: "com.android.application"

import com.android.build.OutputFile

project.ext.react = [
    entryFile: "index.js"
]

apply from: "../../node_modules/react-native-vector-icons/fonts.gradle"

apply from: "../../node_modules/react-native/react.gradle"


def enableSeparateBuildPerCPUArchitecture = false

def enableProguardInReleaseBuilds = false

android {
    compileSdkVersion rootProject.ext.compileSdkVersion
    buildToolsVersion rootProject.ext.buildToolsVersion

    defaultConfig {
        applicationId "com.TESTAPP"
        minSdkVersion 18
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 39
        versionName "32.0"
        multiDexEnabled true
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }
    }
    signingConfigs {
      release {
        if (project.hasProperty('TESTAPP_RELEASE_STORE_FILE')) {
          storeFile file(TESTAPP_RELEASE_STORE_FILE)
          storePassword TESTAPP_RELEASE_STORE_PASSWORD
          keyAlias TESTAPP_RELEASE_KEY_ALIAS
          keyPassword TESTAPP_RELEASE_KEY_PASSWORD
        }
      }
    }
    splits {
        abi {
            reset()
            enable enableSeparateBuildPerCPUArchitecture
            universalApk false  // If true, also generate a universal APK
            include "armeabi-v7a", "x86"
        }
    }
    buildTypes {
        release {
            minifyEnabled enableProguardInReleaseBuilds
            proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
            signingConfig signingConfigs.release
        }
    }
    // applicationVariants are e.g. debug, release
    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            // For each separate APK per architecture, set a unique version code as described here:
            // http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
            def versionCodes = ["armeabi-v7a":1, "x86":2]
            def abi = output.getFilter(OutputFile.ABI)
            if (abi != null) {  // null for the universal-debug, universal-release variants
                output.versionCodeOverride =
                        versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
            }
        }
    }
}

dependencies {
    compile project(':react-native-linear-gradient')
    compile project(':react-native-google-signin')
    compile project(':react-native-cookie')
    compile project(':react-native-maps')
    compile project(':react-native-svg')
    compile project(':react-native-video')
    compile project(':react-native-document-picker')
    compile project(':react-native-orientation')
    compile project(':react-native-device-info')
    compile project(':react-native-view-shot')
    compile project(':react-native-config')
    compile project(':@terrylinla/react-native-sketch-canvas')
    compile project(':react-native-android-location-services-dialog-box')
    compile project(':react-native-connectivity-status')
    compile(project(':react-native-geolocation-service')) {
      exclude group: 'com.google.android.gms', module: 'play-services-location'
    }
    compile project(':rn-fetch-blob')
    compile project(':react-native-fs')
    compile project(':react-native-image-picker')
    compile (project(':react-native-maps')) {
        exclude group: 'com.google.android.gms', module: 'play-services-base'
        exclude group: 'com.google.android.gms', module: 'play-services-maps'
    }
    compile(project(':react-native-camera')) {
      exclude group: 'com.google.android.gms', module: 'play-services-vision'
    }
    compile project(':react-native-mixpanel')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:25.3.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
    compile 'com.google.android.gms:play-services-location:15.0.1'
    compile 'com.google.android.gms:play-services-vision:15.0.1'
    compile 'com.google.android.gms:play-services-maps:15.0.1'
    compile 'com.google.android.gms:play-services-tasks:15.0.1'
    compile (project(":react-native-google-signin")) {
        exclude group: 'com.google.android.gms'
    }
    compile project(':react-native-background-geolocation')
    compile project(':react-native-background-fetch')
}

task copyDownloadableDepsToLibs(type: Copy) {
    from configurations.compile
    into 'libs'
}

apply plugin: 'com.google.gms.google-services' // <--- this should be the last line

AndroidManifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.TestApp"
    android:versionCode="39.0"
    android:versionName="32.0">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.RECORD_AUDIO"/>
    <uses-permission android:name="android.permission.RECORD_VIDEO"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  
    <application
      android:name=".MainApplication"
      android:allowBackup="true"
      android:label="@string/app_name"
      android:icon="@mipmap/ic_launcher"
      android:theme="@style/AppTheme"
      android:largeHeap="true"
        tools:node="replace">
      <activity
        android:name=".SplashActivity"
        android:label="@string/app_name"
        android:theme="@style/SplashTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <action android:name="android.intent.action.DOWNLOAD_COMPLETE"/>
        </intent-filter>
      </activity>
      <activity android:name=".MainActivity"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
            android:windowSoftInputMode="adjustResize"
            android:launchMode="singleTask"
            android:exported="true"
        >
          <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="TestApp"/>
          </intent-filter>
      </activity>
      <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
        <intent-filter>
          <action android:name="android.intent.action.VIEW"/>
          <category android:name="android.intent.category.DEFAULT"/>
          <category android:name="android.intent.category.BROWSABLE"/>
        </intent-filter>
        <intent-filter>
          <action android:name="b1df7482" />
          <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
      <meta-data android:name="com.transistorsoft.locationmanager.license" android:value=KEY />
      <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
      <meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="@string/maps_api_key"/>
      <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.TestApp.provider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
          android:name="android.support.FILE_PROVIDER_PATHS"
          android:resource="@xml/provider_paths" />
      </provider>
      <activity
        android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity"
        android:screenOrientation="portrait"
        android:windowSoftInputMode="stateAlwaysHidden|adjustPan" />
    </application>
</manifest>

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 18 (11 by maintainers)

Most upvoted comments

Also, your android/build.gradle is missing the Gradle ext var googlePlayServicesVersion.

Add this:

buildscript {
    ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 16
        compileSdkVersion = 27
        targetSdkVersion = 27
        supportLibVersion = "27.1.1"
        googlePlayServicesAuthVersion = '15.0.1'
+       googlePlayServicesVersion = "16.0.0"
    }
}