Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • RINGING_MODE_SILENT Not Executing in Android Application

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 429
    Answer it

    Dear all,

    I am not able to access RINGING_MODE_SILENT in my application it crashes my application. I am using android oreo 8.1 API level 27. Here is the log file

     

    2019-01-18 14:42:58.818 5658-5658/com.example.user.speakercontrol E/AndroidRuntime: FATAL EXCEPTION: main
        Process: com.example.user.speakercontrol, PID: 5658
        java.lang.SecurityException: Not allowed to change Do Not Disturb state
            at android.os.Parcel.readException(Parcel.java:2013)
            at android.os.Parcel.readException(Parcel.java:1959)
            at android.media.IAudioService$Stub$Proxy.setRingerModeExternal(IAudioService.java:1127)
            at android.media.AudioManager.setRingerMode(AudioManager.java:1007)
            at com.example.user.speakercontrol.MainActivity$3.onClick(MainActivity.java:50)
            at android.view.View.performClick(View.java:6300)
            at android.view.View$PerformClick.run(View.java:24941)
            at android.os.Handler.handleCallback(Handler.java:790)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:164)
            at android.app.ActivityThread.main(ActivityThread.java:6523)
            at java.lang.reflect.Method.invoke(Native Method)
            at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)

     

     

    Please help me with this issue. 

     

    Thanks and Regards,

    Thippeswamy H U

 0 Answer(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: