Android Tutorial SMS and CALL_LOG permissions are no longer available

Discussion in 'Tutorials & Examples' started by Erel, Oct 10, 2018.

Thread Status:
Not open for further replies.
  1. Erel

    Erel Administrator Staff Member Licensed User

    Google has changed their policy regarding the following permissions:
    READ_SMS, SEND_SMS, WRITE_SMS, RECEIVE_SMS
    READ_CALL_LOG, WRITE_CALL_LOG, PROCESS_OUTGOING_CALLS

    Only the default phone or messaging apps can use these permissions:
    https://support.google.com/googleplay/android-developer/answer/9047303?hl=en

    This is relevant for Google Play apps.

    The following types of objects can no longer be used:

    - CallLog
    - SmsMessages
    - PhoneSms
    - SmsInterceptor (and the equivalent static intent filter)

    1. Note that you can send sms messages with an intent and without a permission:
    Code:
    Dim In As Intent
    Dim number = "0123456789" As String
    In.Initialize(In.ACTION_VIEW, "sms:" & number)
    In.PutExtra("sms_body""this is the body")
    StartActivity(In)
    2. Adding a library doesn't add any permission. You can safely use the Phone library as long as you don't declare any of the above objects.

    3. Click on the List Permissions button (in the logs tab) to see your apps permissions.
     
    juvanum, Multiverse app, Beja and 8 others like this.
  2. kisoft

    kisoft Active Member Licensed User

    HI
    And how to receive an SMS without permission?
     
  3. DonManfred

    DonManfred Expert Licensed User

    Looks like this is no longer possible.
    Away from that you should always create a new thread instead of posting to existing threads!
     
  4. mw71

    mw71 Active Member Licensed User

    Hi Erel,

    Thanks for Info (and way to send SMS, came to right time)

    my App that use SmsInterceptor is not on Play Store (deliver direct to the 2 users), so that this is not relevant for me. Right?
     
  5. DonManfred

    DonManfred Expert Licensed User

    Probably yes.
     
    Erel likes this.
  6. Erel

    Erel Administrator Staff Member Licensed User

    That's true. It is a new Google Play policy. It doesn't affect the app behavior.
     
  7. petr4ppc

    petr4ppc Active Member Licensed User

    Dear friends

    I am using
    Code:
    Dim myCallLog As CallLog
    Dim myList As List
    Dim myitem As CallItem
    myList = myCallLog.GetAll(
    0)
    with myphone.sdkversion=26, Android 8

    I have not this app in google play. I have only my own instalation.
    I get error:

    I am using this permission:
    Code:
    rp.CheckAndRequest(rp.PERMISSION_READ_CALL_LOG)
                                            
    wait for Activity_PermissionResult(permission As String, result As Boolean)
                                            
    If result=True Then
                                                
    '-----------CALL LOG
                                                    Dim myCallLog As CallLog
                                                    
    Dim myList As List
                                                    
    Dim myitem As CallItem
                                                    myList = myCallLog.GetAll(
    0)
                                            
    End If
    In Manifesteditor i have:
    Code:
    AddPermission(android.permission.READ_CALL_LOG)
    The trouble is Google, my Phone or my code, please?
    Thank you
    p4ppc
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this. Also upload the code if possible.
     
Thread Status:
Not open for further replies.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice