Hello,
I'm having some problems with android 7 (I'm using b4A v7)
Events are not fired by some libraries.
Here's an example for PhoneStateListener library
'*** LIBRARY LINK ***
https://www.b4x.com/android/forum/threads/phonestatelistener.12377/
'*** PERMISSION INCLUDED IN MANIFEST ***
AddPermission("android.permission.ACCESS_COARSE_LOCATION")
AddPermission("android.permission.ACCESS_NETWORK_STATE")
AddPermission("android.permission.CHANGE_NETWORK_STATE")
AddPermission("android.permission.ACCESS_COARSE_UPDATES")
AddPermission("android.permission.READ_PHONE_STATE")
*** LOGS ***
-------------------------------------------------------------------------
** Activity (main) Create, isFirst = true **
PhoneStateListener has been initialized.
** Activity (main) Resume **
onServiceStateChanged IN SERVICE
onMessageWaitingIndicatorChanged false
onCallForwardingIndicatorChanged false
onCellLocationChanged [30968,81464840,-1]
onCallStateChanged: 0 &
onDataConnectionStateChanged Connected
onDataActivity INOUT
onSignalStrengthChanged SignalStrength: 99 0 -120 -160 -120 -1 -1 15 -110 -11 42 2147483647 2147483647 gsm|lte
SignalStrength: 99 0 -120 -160 -120 -1 -1 15 -110 -11 42 2147483647 2147483647 gsm|lte
-------------------------------------------------------------------------
The event PSL_onSignalStrengthsChanged is fired only the first time then no more.
This appear only with nougat (v7).
With android 4.x, 5.x and 6.x no problem at all (the event is fired correctly)
Some hints?
Thanks,
Massimiliano
I'm having some problems with android 7 (I'm using b4A v7)
Events are not fired by some libraries.
Here's an example for PhoneStateListener library
'*** LIBRARY LINK ***
https://www.b4x.com/android/forum/threads/phonestatelistener.12377/
'*** PERMISSION INCLUDED IN MANIFEST ***
AddPermission("android.permission.ACCESS_COARSE_LOCATION")
AddPermission("android.permission.ACCESS_NETWORK_STATE")
AddPermission("android.permission.CHANGE_NETWORK_STATE")
AddPermission("android.permission.ACCESS_COARSE_UPDATES")
AddPermission("android.permission.READ_PHONE_STATE")
B4X:
Sub Process_Globals
End Sub
Sub Globals
Dim psl As PhoneStateListener
End Sub
Sub Activity_Create(FirstTime As Boolean)
psl.Initialize("PSL", True)
psl.startListening()
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub PSL_onSignalStrengthsChanged (signalStrength As String)
Log(signalStrength)
End Sub
*** LOGS ***
-------------------------------------------------------------------------
** Activity (main) Create, isFirst = true **
PhoneStateListener has been initialized.
** Activity (main) Resume **
onServiceStateChanged IN SERVICE
onMessageWaitingIndicatorChanged false
onCallForwardingIndicatorChanged false
onCellLocationChanged [30968,81464840,-1]
onCallStateChanged: 0 &
onDataConnectionStateChanged Connected
onDataActivity INOUT
onSignalStrengthChanged SignalStrength: 99 0 -120 -160 -120 -1 -1 15 -110 -11 42 2147483647 2147483647 gsm|lte
SignalStrength: 99 0 -120 -160 -120 -1 -1 15 -110 -11 42 2147483647 2147483647 gsm|lte
-------------------------------------------------------------------------
The event PSL_onSignalStrengthsChanged is fired only the first time then no more.
This appear only with nougat (v7).
With android 4.x, 5.x and 6.x no problem at all (the event is fired correctly)
Some hints?
Thanks,
Massimiliano