Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Android] crashes on api level 22 #149

Open
AhmadMHawwash opened this issue Apr 19, 2019 · 1 comment
Open

[Android] crashes on api level 22 #149

AhmadMHawwash opened this issue Apr 19, 2019 · 1 comment

Comments

@AhmadMHawwash
Copy link

AhmadMHawwash commented Apr 19, 2019

issue:

  • android 5 and 5.1 crash on first open the app

error log:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.perfectfit.qurankareem, PID: 4021
    java.lang.SecurityException: Neither user 10054 nor current process has android.permission.READ_PHONE_STATE.
        at android.os.Parcel.readException(Parcel.java:1546)
        at android.os.Parcel.readException(Parcel.java:1499)
        at com.android.internal.telephony.ITelephonyRegistry$Stub$Proxy.listenForSubscriber(ITelephonyRegistry.java:544)
        at android.telephony.TelephonyManager.listen(TelephonyManager.java:2413)
        at com.audioStreaming.Signal.setData(Signal.java:92)
        at com.audioStreaming.ReactNativeAudioStreamingModule.onServiceConnected(ReactNativeAudioStreamingModule.java:79)
        at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1208)
        at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1225)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:135)
        at android.app.ActivityThread.main(ActivityThread.java:5254)
        at java.lang.reflect.Method.invoke(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:372)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

project dependencies:

  • react-native: 0.57.8
  • react-native-audio-stream: ^2.6.1

android dependecies:

  • classpath 'com.android.tools.build:gradle:3.3.2'

some android project settings:

  • buildToolsVersion = "27.0.3"
  • minSdkVersion = 16
  • compileSdkVersion = 27
  • targetSdkVersion = 26
  • supportLibVersion = "27.1.1"

any ideas?

@arcollector
Copy link

add this to your AndroidManifest.xml
<uses-permission tools:node="remove" android:name="android.permission.READ_PHONE_STATE" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants