Git Product home page Git Product logo

Comments (7)

PopLocker714 avatar PopLocker714 commented on September 6, 2024 2

AndroidManifest.xml
<application android:allowBackup="true" </application>
change "android:allowBackup" to true

from react-native-call-detection.

Akshat-simform avatar Akshat-simform commented on September 6, 2024 1

Hi.. can you please help me out. This is not working for me.

from react-native-call-detection.

mehranali12 avatar mehranali12 commented on September 6, 2024

I have found the solution to integrate this library. if anyone faces any issues leave a comment for me. thanks

from react-native-call-detection.

thepragmaticidealist avatar thepragmaticidealist commented on September 6, 2024

This happens for me as well. Would appreciate an assist @mehranali12 . I'm using Android 13 (API=33) with "react": "18.2.0", "react-native": "0.73.2", "react-native-call-detection": "^1.9.0",

I also get this error
Screenshot 2024-01-17 at 21 30 06

from react-native-call-detection.

Akshat-simform avatar Akshat-simform commented on September 6, 2024

This happens for me as well. Would appreciate an assist @mehranali12 . I'm using Android 13 (API=33) with "react": "18.2.0", "react-native": "0.73.2", "react-native-call-detection": "^1.9.0",

I also get this error Screenshot 2024-01-17 at 21 30 06

This is the issue with React-Native-Call-Detection actually their is a permission for phone state which is only working in android 10 or below.. version higher its not working and giving same.. I have tried by making a emulator with android 10 and it worked for me.

from react-native-call-detection.

thepragmaticidealist avatar thepragmaticidealist commented on September 6, 2024

Thanks everyone, @PopLocker714, I added this tools:replace="android:allowBackup" to the manifest file android/app/src/main/AndroidManifest.xml in the application section to get rid of the allowBackup error. To get rid of the Telephony permissions error, I created this function and called it in a useEffect hook in App.js before the listener is called.

These are the permissions in my AndroidManifest file

  <uses-permission android:name="android.permission.CALL_PHONE" />
   <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
import {
  PermissionsAndroid
} from "react-native";


useEffect(() => {
    requestForPermissions();
    startListenerTapped();
    return () => {
      stopListenerTapped();
    };
  }, []);

const requestForPermissions = async() => {
    try {
      const permissions = await PermissionsAndroid.requestMultiple(
       [
        PermissionsAndroid.PERMISSIONS.READ_CALL_LOG,
        PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE
       ]);
      console.log('Permissions are: ', permissions);
     } catch (err) {
       console.warn(err);
     }
  }

I still have the Deprecated Gradle error but it doesn't prevent react-native run-android from finishing successfully.

from react-native-call-detection.

PopLocker714 avatar PopLocker714 commented on September 6, 2024

@thepragmaticidealist try changing the minimum sdk version, to do this in the androin/build.gradle file, change the line from minSdkVersion to version 24

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        // minSdkVersion = 21
        minSdkVersion = 24
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "25.1.8937393"
        kotlinVersion = "1.8.0"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
    }
}

apply plugin: "com.facebook.react.rootproject"

from react-native-call-detection.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.