Permission Denial With Broadcast Receiver

前端 未结 6 850
醉酒成梦
醉酒成梦 2021-02-13 13:27

I am trying to create an app which enters a log message when I make an outgoing call.

However, when I run the code, I get a permission denial, despite the fact that I h

6条回答
  •  滥情空心
    2021-02-13 14:03

    I got it to work by following this link closely Intercepting outgoing call - what am I missing? (thanks ajit)

    I ended up taking off the PHONE_STATE permission, adding android:enabled="true" and android:exported="true" to my receiver in the manifest, relocating the NEW_OUTGOING_CALL permission to below application(not sure if this is necessary), taking away the intended sdk versions and basically copying the receiver from the link.

    Updated manifest code from receiver tag to manifest tag is:

        
                
    
                    -->
                
            
        
    
         >-->
    
     
    

提交回复
热议问题