distriqt / ANE-Message

Send messages from AIR using email and SMS
https://airnativeextensions.com/extension/com.distriqt.Message
0 stars 0 forks source link

Permission always is denied #29

Closed sergibh closed 7 years ago

sergibh commented 7 years ago

Hi, I am using your current version (v5.2) and when run my app on android with SDK 23 or above (I could test in 2 devices with version 6.0), app shows me the dialog to check the permission, I mark the SMS permission, but in code I always get "denied" despite I grantted it, and hasAuthorisation() always returns false. Attach code I am using, console log and logcat

// Check if we have access to the user's contacts
if (Message.isSupported)
{
    if (!Message.service.smsManager.hasAuthorisation())
    {
        Message.service.smsManager.addEventListener(com.distriqt.extension.message.events.AuthorisationEvent.CHANGED, authorisationStatus_changedHandler);

        switch (Message.service.smsManager.authorisationStatus())
        {
            case AuthorisationStatus.SHOULD_EXPLAIN:
            case AuthorisationStatus.NOT_DETERMINED:
                // REQUEST ACCESS: This will display the permission dialog
                Message.service.smsManager.requestAuthorisation();
                return;

            case AuthorisationStatus.DENIED:
            case AuthorisationStatus.UNKNOWN:
            case AuthorisationStatus.RESTRICTED:
                // ACCESS DENIED: You should inform your user appropriately
                return;

            case AuthorisationStatus.AUTHORISED:
                // AUTHORISED: SMS will be available
                break;  
        }
    }
    else
    {   
        sendCmdDelete();
    }
}

private function authorisationStatus_changedHandler(event:com.distriqt.extension.message.events.AuthorisationEvent):void
{
    trace("authorisationStatus_changedHandler: "+event.status);
}
Console (traces):
[SWF] com.distriqt.Contacts - 20,499 bytes after decompression
OS_NAME - Android
OS_VERSION - 6.0
OS_BUILD - BalongC50B311
OS_SDK_VERSION - 23
OS_SDK_DESCRIPTION - hi6210sft-user 6.0 MRA58K eng.jenkins.20160627.180733 test-keys
PRODUCT_MODEL - hi6210sft
PRODUCT_BRAND - hi6210sft
PRODUCT_NAME - hi6210sft
PRODUCT_VERSION - null
PRODUCT_BOARD - BalongV8R1SFT
PRODUCT_CPU - arm64-v8a
PRODUCT_MANUFACTURER - HUAWEI
OPENGLES_VERSION - 131072
LCD_DENSITY - 320
DALVIK_HEAPSIZE - 512m
authorisationStatus_changedHandler: denied
authorisationStatus_changedHandler: denied
07-28 08:48:14.005  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-71 "WLAN_MFA"WPA_PSK
07-28 08:48:14.009  3081  3452 I HuaweiWifiWatchdogStateMachine: spd good count:0,72, add sc:0.0, rate:1.0
07-28 08:48:14.009  3081  3452 I HuaweiWifiWatchdogStateMachine: current mHighDataFlowRate = 1.0
07-28 08:48:14.009  3081  3452 I HuaweiWifiWatchdogStateMachine: POta txb txg rxg:0, 2, 0. Lr =0% Totpkt=2
07-28 08:48:14.010  3081  3081 I WifiProJNI: ######### CMD_QUERY_PKTS ########
07-28 08:48:14.010  3081  3451 I QosMonitor: postEventFromNative: msg=100,arg1=0,arg2=9
07-28 08:48:14.010  3081  3451 W WifiProJNI: poll before: g_monitor_fd =149
07-28 08:48:14.010  3081  3081 I MQoS    : rtt=1420,tcp_tx_pkts=359717,tcp_rx_pkts=537481
07-28 08:48:14.012  3081  3452 I HuaweiWifiWatchdogStateMachine: PTcp RTT:0, rtt pkt=0, tcp_rx=1, tcp_tx=2, tcp_reTran=0, rtRate=0
07-28 08:48:14.012  3081  3452 I HuaweiWifiWatchdogStateMachine: rt ota tcp rl bad: false, false, false, false; rsth:-75
07-28 08:48:14.013  3081  3452 I HuaweiWifiWatchdogStateMachine:  pkt chk not bad, ### mPktChkBadCnt and sc is 0.
07-28 08:48:14.015  3081  3081 I MQoS    : QOS_level:5(5),wifi-link;use signalLvl:5;RAT:4G
07-28 08:48:15.011  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:15.839  3081  3081 I TrafficMonitor: update:rxPkts:0,txPkts:0,rxBytes:0,txBytes:0
07-28 08:48:15.839  3081  3081 I TrafficMonitor: start expired. level:-1
07-28 08:48:15.839  3081  3081 I TrafficMonitor: gettimer:interval=2000
07-28 08:48:16.013  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:16.575  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:17.008  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:17.844  3081  3081 I TrafficMonitor: update:rxPkts:0,txPkts:0,rxBytes:0,txBytes:0
07-28 08:48:17.844  3081  3081 I TrafficMonitor: start expired. level:-1
07-28 08:48:17.844  3081  3081 I TrafficMonitor: gettimer:interval=2000
07-28 08:48:18.015  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:18.834  3081  3081 I TrafficMonitor: expired arrive. level:-1
07-28 08:48:18.835  3081  3081 I TrafficMonitor: during_ms:2005,period_ms:2000
07-28 08:48:18.835  3081  3081 I TrafficMonitor: count:250,rx_sum:0,tx_sum:0,rxBytes:0,during_ms:2005,rx_speed:0.0,tx_speed:0.0,rto:0.0
07-28 08:48:19.017  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:19.587  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:19.798  3081  3093 I SendBroadcastPermission: action:android.os.action.POWER_SAVE_TEMP_WHITELIST_CHANGED, mPermissionType:0
07-28 08:48:19.848  3081  3081 I TrafficMonitor: update:rxPkts:0,txPkts:0,rxBytes:0,txBytes:0
07-28 08:48:19.849  3081  3081 I TrafficMonitor: start expired. level:-1
07-28 08:48:19.849  3081  3081 I TrafficMonitor: gettimer:interval=2000
07-28 08:48:20.018  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:20.648  3081  3402 W AlarmManager: WAKEUP alarm trigger action = com.google.android.location.ALARM_WAKEUP_LOCATOR elapsed = 424975815
07-28 08:48:20.673  3573  3573 I wpa_supplicant: set current WIFI status to BT!
07-28 08:48:20.689  3978 10225 W PhoneInterfaceManager: shouldBlockLocation running ...
07-28 08:48:20.689  3978 10225 I PhoneInterfaceManager: shouldBlockLocation  ret:false
07-28 08:48:20.704  3978  4038 W PhoneInterfaceManager: shouldBlockLocation running ...
07-28 08:48:20.705  3978  4038 I PhoneInterfaceManager: shouldBlockLocation  ret:false
07-28 08:48:20.714  3081  4330 I AccountManagerService: getTypesVisibleToCaller: isPermitted? true
07-28 08:48:20.722  3978  4164 W PhoneInterfaceManager: shouldBlockLocation running ...
07-28 08:48:20.722  3978  4164 I PhoneInterfaceManager: shouldBlockLocation  ret:false
07-28 08:48:20.952  3573  3573 I wpa_supplicant: set current WIFI status to BT!
07-28 08:48:20.959  3081  3425 I SendBroadcastPermission: action:android.net.wifi.SCAN_RESULTS, mPermissionType:0
07-28 08:48:20.964  3958  3958 I System.out: BitString length 17
07-28 08:48:20.964  3958  3958 I System.out: MAC Address00:1c:7b:d3:97:e4
07-28 08:48:20.964  3958  3958 I System.out: BitString length 17
07-28 08:48:20.964  3958  3958 I System.out: MAC Addressee:9f:db:f7:3e:85
07-28 08:48:20.964  3958  3958 I System.out: BitString length 17
07-28 08:48:20.964  3958  3958 I System.out: MAC Addressde:9f:db:f7:3e:85
07-28 08:48:20.964  3958  3958 I System.out: BitString length 17
07-28 08:48:20.964  3958  3958 I System.out: MAC Address00:1d:1a:0f:2b:b4
07-28 08:48:20.964  3958  3958 I System.out: BitString length 17
07-28 08:48:20.964  3958  3958 I System.out: MAC Addressc0:56:27:83:a1:4d
07-28 08:48:20.978  3958  3958 I SUPL20_LocMan: Phone type:GSM
07-28 08:48:20.979  3958  3958 I SUPL20_LocMan: Network Op Mnc= 1 MCC = 214
07-28 08:48:20.979  3958  3958 I SUPL20_LocMan: cellInfo NetworkType:NOT RETERIVE,21
07-28 08:48:20.979  3958  6729 I SUPL20_SPIMESLP-SENDING: m_bPacket.length 415
07-28 08:48:20.979  3958  6729 I SUPL20_SPIMESLP-SENDING: bBrokenPipe = false
07-28 08:48:21.014  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:21.851  3081  3081 I TrafficMonitor: update:rxPkts:0,txPkts:0,rxBytes:0,txBytes:0
07-28 08:48:21.851  3081  3081 I TrafficMonitor: start expired. level:-1
07-28 08:48:21.851  3081  3081 I TrafficMonitor: gettimer:interval=2000
07-28 08:48:22.022  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:22.027  3081  3452 I HuaweiWifiWatchdogStateMachine: spd good count:0,72, add sc:0.0, rate:1.0
07-28 08:48:22.029  3081  3452 I HuaweiWifiWatchdogStateMachine: current mHighDataFlowRate = 1.0
07-28 08:48:22.029  3081  3452 I HuaweiWifiWatchdogStateMachine: not any pkt, ignore this period chk result.
07-28 08:48:22.117  3081  3411 E InputReader: QEEXO fs_touch_up NULL, not calling FingerSense
07-28 08:48:22.126 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:22.598  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-72 "WLAN_MFA"WPA_PSK
07-28 08:48:23.022  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-71 "WLAN_MFA"WPA_PSK
07-28 08:48:23.410  3081  3411 E InputReader: QEEXO fs_classify_touch NULL, not calling FingerSense
07-28 08:48:23.552  3081  3411 E InputReader: QEEXO fs_touch_up NULL, not calling FingerSense
07-28 08:48:23.619 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:23.630 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:23.648  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:23.649  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:23.650  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:23.650  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:23.685  3970  4627 W PGApi_client: recv actoionId = 10000, action = com.huawei.pgmng.PGAction@38b80ad actionId =10000 pkg =com.android.packageinstaller extend1 =8127 extend2 = flag =3 type =1
07-28 08:48:23.685  3970  4627 W PGMiddleWare: in handleAction method, action = 10000
07-28 08:48:23.685  3970  4627 W PGMiddleWare: in handleAction, invoke client = com.huawei.pgmng.middleware.AudioEffectLowPowerImpl@8ae26d5, action = com.huawei.pgmng.PGAction@38b80ad actionId =10000 pkg =com.android.packageinstaller extend1 =8127 extend2 = flag =3 type =1
07-28 08:48:23.685  3970  4627 W AudioEffectLowPowerImpl: mAudioManager.setParameters = SmartPA_lowpower=off
07-28 08:48:23.692  3575  4214 I HwSystemManager: NotificationGuideService:handle MSG_ACTIVIY_FOREGROUND, uid:10068
07-28 08:48:23.694  2424  4042 I [Gralloc]: alloc w[720] h[1280] format[1] usage[2355]
07-28 08:48:23.698  2424  4042 I [Gralloc]: alloc succ handle[0x55b1135e00] stride[720]
07-28 08:48:23.708  2424  2424 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:23.829 26720 26737 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:23.829 26720 26737 I OpenGLRenderer: Initialized EGL, version 1.4
07-28 08:48:23.833 26720 26737 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:23.834  2424  4042 I [Gralloc]: alloc w[640] h[422] format[1] usage[3842]
07-28 08:48:23.836  2424  4042 I [Gralloc]: alloc succ handle[0x55b11c5130] stride[640]
07-28 08:48:23.837  2424  2872 I [Gralloc]: alloc w[640] h[422] format[1] usage[3842]
07-28 08:48:23.838  2424  2872 I [Gralloc]: alloc succ handle[0x55b11c4230] stride[640]
07-28 08:48:23.838  2424  2872 I [Gralloc]: alloc w[640] h[422] format[1] usage[3842]
07-28 08:48:23.839  2424  2872 I [Gralloc]: alloc succ handle[0x55b11c4400] stride[640]
07-28 08:48:23.839  2424  2872 I [Gralloc]: alloc w[640] h[422] format[1] usage[3842]
07-28 08:48:23.841 26720 26720 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:23.841  2424  2872 I [Gralloc]: alloc succ handle[0x55b11c4900] stride[640]
07-28 08:48:23.852  3081  3081 I TrafficMonitor: update:rxPkts:0,txPkts:0,rxBytes:0,txBytes:0
07-28 08:48:23.852  3081  3081 I TrafficMonitor: start expired. level:-1
07-28 08:48:23.852  3081  3081 I TrafficMonitor: gettimer:interval=2000
07-28 08:48:23.859  2424  2424 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:23.880  2424  2528 I [Gralloc]: alloc w[720] h[1208] format[1] usage[2355]
07-28 08:48:23.880  3081  3100 I ActivityManager: Displayed com.android.packageinstaller/.permission.ui.GrantPermissionsActivity: +200ms (total +248ms)
07-28 08:48:23.883  2424  2528 I [Gralloc]: alloc succ handle[0x55b114ec90] stride[720]
07-28 08:48:23.891  2424  2424 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:24.018  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-70 "WLAN_MFA"WPA_PSK
07-28 08:48:24.445  3081  3081 I MQoS    : onSignal: mSubId=0,currDataSubID=0
07-28 08:48:24.446  3081  3081 I MQoS    : received cell-signal:5
07-28 08:48:24.446  3081  4260 I SendBroadcastPermission: action:android.intent.action.SIG_STR, mPermissionType:0
07-28 08:48:24.452  3505  3594 I HwCustMobileSignalControllerImpl: subId:0 phoneType:1 networktype:13 targetClass:3 masterLevel:4 slaveLevel:-1
07-28 08:48:24.632  3081  3411 E InputReader: QEEXO fs_classify_touch NULL, not calling FingerSense
07-28 08:48:24.637 26720 26720 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:24.655  2424  2424 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:24.774  3081  3411 E InputReader: QEEXO fs_touch_up NULL, not calling FingerSense
07-28 08:48:24.795  3970  4627 W PGApi_client: recv actoionId = 10000, action = com.huawei.pgmng.PGAction@668afe2 actionId =10000 pkg =air.uk.co.telguard.debug extend1 =8128 extend2 = flag =3 type =1
07-28 08:48:24.795  3970  4627 W PGMiddleWare: in handleAction method, action = 10000
07-28 08:48:24.795  3970  4627 W PGMiddleWare: in handleAction, invoke client = com.huawei.pgmng.middleware.AudioEffectLowPowerImpl@8ae26d5, action = com.huawei.pgmng.PGAction@668afe2 actionId =10000 pkg =air.uk.co.telguard.debug extend1 =8128 extend2 = flag =3 type =1
07-28 08:48:24.816 27513 27513 I air.uk.co.telguard.debug: authorisationStatus_changedHandler: denied
07-28 08:48:24.817 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:24.818  3505  3505 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:24.821  2424  2424 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:24.843 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:24.843 27513 27513 I AVC     : abe95530
07-28 08:48:24.848  3081  3081 I TrafficMonitor: expired arrive. level:-1
07-28 08:48:24.849  3081  3081 I TrafficMonitor: during_ms:2001,period_ms:2000
07-28 08:48:24.849  3081  3081 I TrafficMonitor: count:253,rx_sum:0,tx_sum:0,rxBytes:0,during_ms:2001,rx_speed:0.0,tx_speed:0.0,rto:0.0
07-28 08:48:24.867  3081  3096 I SendBroadcastPermission: action:android.net.conn.DATA_ACTIVITY_CHANGE, mPermissionType:0
07-28 08:48:24.970  2424  2424 W SurfaceFlinger: couldn't log to binary event log: overflow.
07-28 08:48:25.014  4454  4463 I art     : Background partial concurrent mark sweep GC freed 42247(2MB) AllocSpace objects, 2(40KB) LOS objects, 39% free, 24MB/40MB, paused 1.554ms total 136.545ms
07-28 08:48:25.020  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-70 "WLAN_MFA"WPA_PSK
07-28 08:48:25.102  2424  2424 W SurfaceFlinger: couldn't log to binary event log: overflow.
07-28 08:48:25.604  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-70 "WLAN_MFA"WPA_PSK
07-28 08:48:25.856  3081  3081 I TrafficMonitor: update:rxPkts:0,txPkts:0,rxBytes:0,txBytes:0
07-28 08:48:25.857  3081  3081 I TrafficMonitor: start expired. level:-1
07-28 08:48:25.857  3081  3081 I TrafficMonitor: gettimer:interval=2000
07-28 08:48:26.026  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-70 "WLAN_MFA"WPA_PSK
07-28 08:48:26.333  3081  3411 E InputReader: QEEXO fs_classify_touch NULL, not calling FingerSense
07-28 08:48:26.419  3081  3411 E InputReader: QEEXO fs_touch_up NULL, not calling FingerSense
07-28 08:48:26.460 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:26.470 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:26.485  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:26.486  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:26.487  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:26.487  3970  3970 W K3V3CpuGovernorPolicy: write freq file stream is null !
07-28 08:48:26.524  3970  4627 W PGApi_client: recv actoionId = 10000, action = com.huawei.pgmng.PGAction@af5ef73 actionId =10000 pkg =com.android.packageinstaller extend1 =8129 extend2 = flag =3 type =1
07-28 08:48:26.524  3970  4627 W PGMiddleWare: in handleAction method, action = 10000
07-28 08:48:26.524  3970  4627 W PGMiddleWare: in handleAction, invoke client = com.huawei.pgmng.middleware.AudioEffectLowPowerImpl@8ae26d5, action = com.huawei.pgmng.PGAction@af5ef73 actionId =10000 pkg =com.android.packageinstaller extend1 =8129 extend2 = flag =3 type =1
07-28 08:48:26.531  3575  4214 I HwSystemManager: NotificationGuideService:handle MSG_ACTIVIY_FOREGROUND, uid:10068
07-28 08:48:26.535  2424  4042 I [Gralloc]: alloc w[720] h[1280] format[1] usage[2355]
07-28 08:48:26.539  2424  4042 I [Gralloc]: alloc succ handle[0x55b11bc610] stride[720]
07-28 08:48:26.547  2424  2424 E HAL     : load: id=gralloc != hmi->id=gralloc
07-28 08:48:26.589  3970  4627 W PGApi_client: recv actoionId = 10000, action = com.huawei.pgmng.PGAction@f9e2e30 actionId =10000 pkg =air.uk.co.telguard.debug extend1 =8129 extend2 = flag =3 type =1
07-28 08:48:26.589  3970  4627 W PGMiddleWare: in handleAction method, action = 10000
07-28 08:48:26.589  3970  4627 W PGMiddleWare: in handleAction, invoke client = com.huawei.pgmng.middleware.AudioEffectLowPowerImpl@8ae26d5, action = com.huawei.pgmng.PGAction@f9e2e30 actionId =10000 pkg =air.uk.co.telguard.debug extend1 =8129 extend2 = flag =3 type =1
07-28 08:48:26.605 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:26.613 27513 27513 I air.uk.co.telguard.debug: authorisationStatus_changedHandler: denied
07-28 08:48:26.628  3505  3505 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:26.646 27513 27513 I HwSecImmHelper: mSecurityInputMethodService is null
07-28 08:48:26.646 27513 27513 I AVC     : abe95530
07-28 08:48:27.022  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-70 "WLAN_MFA"WPA_PSK
07-28 08:48:27.861  3081  3081 I TrafficMonitor: update:rxPkts:0,txPkts:0,rxBytes:0,txBytes:0
07-28 08:48:27.861  3081  3081 I TrafficMonitor: start expired. level:-1
07-28 08:48:27.861  3081  3081 I TrafficMonitor: gettimer:interval=2000
07-28 08:48:28.022  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-70 "WLAN_MFA"WPA_PSK
07-28 08:48:28.614  3081  3425 E WifiConfigStore: updateConfiguration freq=2462 BSSID=00:1c:7b:d3:97:e4 RSSI=-70 "WLAN_MFA"WPA_PSK

screenshot_2017-07-27-22-39-37 screenshot_2017-07-27-22-40-16 screenshot_2017-07-27-22-40-39

marchbold commented 7 years ago

Hi,

Have you got all the permissions below in your manifest additions?

<uses-permission android:name="android.permission.SEND_SMS" /> 
<uses-permission android:name="android.permission.READ_SMS" /> 
<uses-permission android:name="android.permission.RECEIVE_SMS" />
sergibh commented 7 years ago

Hi, yes I have them

    <android>
        <colorDepth>16bit</colorDepth>

        <manifestAdditions><![CDATA[
            <manifest android:installLocation="auto">
                <!--The new Permission thing on Android works ONLY if you are targetting Android SDK 23 or higher-->
                <uses-sdk android:targetSdkVersion="23"/>

                <uses-permission android:name="android.permission.INTERNET"/>
                <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
                <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
                <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
                <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_SMS"/> 
<uses-permission android:name="android.permission.SEND_SMS"/> 
<uses-permission android:name="android.permission.READ_SMS"/> 
<uses-permission android:name="android.permission.READ_CONTACTS"/>

                <application>
                    <activity android:name="com.distriqt.extension.contacts.activities.ContactPickerActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
                    <activity android:name="com.distriqt.extension.contacts.permissions.AuthorisationActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />
                    <activity android:name="com.distriqt.extension.message.permissions.AuthorisationActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" />

                    <activity android:name="com.distriqt.extension.message.activities.SendMailActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
                    <activity android:name="com.distriqt.extension.message.activities.ShareActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>

                    <receiver android:name="com.distriqt.extension.message.receivers.MessageSMSReceiver" android:exported="true" > 
                        <intent-filter android:priority="1000"> 
                            <action android:name="android.provider.Telephony.SMS_RECEIVED" />
                        </intent-filter> 
                    </receiver>                 
                </application>      
            </manifest>

        ]]></manifestAdditions>
    </android>

    <iPhone>
        <InfoAdditions><![CDATA[
            <!--iOS 8.0 or higher can support this ANE-->
            <key>MinimumOSVersion</key>
            <string>8.0</string>

            <key>UIDeviceFamily</key>
            <array>
                <string>1</string>
                <string>2</string>
            </array>

            <!-- Contacts -->
            <key>NSContactsUsageDescription</key>
            <string>App can select a contact to get his phone number</string>
        ]]></InfoAdditions>
        <requestedDisplayResolution>high</requestedDisplayResolution>
    </iPhone>

    <extensions>
        <extensionID>com.distriqt.Message</extensionID>        
        <extensionID>com.distriqt.Contacts</extensionID>
        <extensionID>com.distriqt.Core</extensionID>
        <extensionID>com.distriqt.androidsupport.V4</extensionID>
    </extensions>
</application>
marchbold commented 7 years ago

Hi,

Does the authorisation request succeed when you don't include the Contacts ANE? Just wondering if there's a conflict there somewhere.

Have you only tested on Android 6.0?

sergibh commented 7 years ago

Hi, I have removed contacts ANE and checked again, but same issue occurred. I have tested in 2 devices with 6.0.1 and one more with 6.0

marchbold commented 7 years ago

Could you post the debug logs from the device? Appears you've only posted the info/warnings/errors above?

sergibh commented 7 years ago

Attach it logcat.txt

marchbold commented 7 years ago

Hi,

Looks like you've missed the android.permission.RECEIVE_SMS permission?

sergibh commented 7 years ago

I am not using this feature, is necessary to add this permission?

marchbold commented 7 years ago

Currently yes, we haven't separated the SMS receive functionality from the send.

sergibh commented 7 years ago

Thanks mate, Now seems that is working perfectly