Spanish Cobertura telefonica

cas6678

Active Member
Licensed User
Longtime User
Hola a todos.

Tengo una aplicacion que guarda un track gps del recorrido de un vehiculo. Quiero incorporar el dato de cobertura de antenas de telefonia movil que hay en cada punto del recorrido.

Alguna sugerencia / ejemplo / libreria para poder hacerlo???

saludos.
 

Star-Dust

Expert
Licensed User
Longtime User
Hola a todos.

Tengo una aplicacion que guarda un track gps del recorrido de un vehiculo. Quiero incorporar el dato de cobertura de antenas de telefonia movil que hay en cada punto del recorrido.

Alguna sugerencia / ejemplo / libreria para poder hacerlo???

saludos.
Idea interesante. Usar la Phone library
 
Last edited:

TILogistic

Expert
Licensed User
Longtime User
de los amigos italianos. 😁😁😁
busqueda:
 

cas6678

Active Member
Licensed User
Longtime User
Estoy tratando de hacer funcionar este ejemplo que encontre en el foro. Entiendo que la variable CdmaDbm me puede dar la informacion que quiero.

Main:
Main:
#Region Module Attributes
    #FullScreen: False
    #IncludeTitle: True
    #ApplicationLabel: PhoneStateListener
    #VersionCode: 1
    #VersionName:
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

'Activity module
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Private b1, b2, b3 As Button
End Sub

Sub Activity_Create(FirstTime As Boolean)
    b1.Initialize("b1")
    b2.Initialize("b2")
    b3.Initialize("b3")
    Activity.AddView(b1, 10%x,10%y,30%x,10%y)
    Activity.AddView(b2, 40%x,10%y,30%x,10%y)
    Activity.AddView(b3, 70%x,10%y,30%x,10%y)
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub b1_click
    StartService(Listener)
End Sub

Sub b2_click
    StopService(Listener)
    Listener.PSL.stopListening
End Sub

Sub b3_click

End Sub

Servicio Listener:

Listener:
#Region Module Attributes
    #StartAtBoot: False
#End Region

'Service module
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    
    'Declares the phone state listener
    Dim PSL As PhoneStateListener

End Sub
Sub Service_Create

    'Initializes the PhoneStateListener.
    'All data is also outputted to the filtered log field.
    PSL.Initialize("PSL",True)
    
    'Starts listening
    PSL.startListeningForEvent(PSL.LISTEN_DATA_ACTIVITY)
    
    'Remember: Find all information about the returns here:
    ' http://developer.android.com/reference/android/telephony/PhoneStateListener.html
    


End Sub

Sub Service_Start (StartingIntent As Intent)

End Sub

Sub Service_Destroy

End Sub
' Callback invoked when the call-forwarding indicator changes.
Sub PSL_onCallForwardingIndicatorChanged(cfi As Boolean)
    
End Sub
'Callback invoked when device call state changes.
'Idle = 0
'Ringing = 1
'OFFHook = 2
Sub PSL_onCallStateChanged (State As Int, incomingNumber As String)

End Sub
' Callback invoked when device cell location changes.
Sub PSL_onCellLocationChanged(Location As String)

End Sub
'Callback invoked when data activity state changes.
Sub PSL_onDataActivity(Direction As Int, strDirection As String)
    ToastMessageShow(strDirection,False)
End Sub
'Callback invoked when connection state changes.
Sub PSL_onDataConnectionStateChanged(state As Int, Connectionstate As String)

End Sub
'Callback invoked when the message-waiting indicator changes.
Sub PSL_onMessageWaitingIndicatorChanged(mwi As Boolean)

End Sub
'Callback invoked when device service state changes.
Sub PSL_onServiceStateChanged(State As Int, strState As String)

End Sub
'Callback invoked when network signal strengths changes.
'you can use getCDma, etc to get the network connection.
Sub PSL_onSignalStrengthsChanged (signalStrength As String) '
    ToastMessageShow(signalStrength, False)
    ToastMessageShow(PSL.CdmaDbm, False)
    Log("PASO") ' por aqui nunca pasa
End Sub

'Remember: Find all information about the returns here:
' http://developer.android.com/reference/android/telephony/PhoneStateListener.html

No se que esta mal pero una vez que activo el servicio (primer boton) esperaba respuesta del Sub PSL_onSignalStrengthsChanged (signalStrength As String) pero esta no llega
 

Star-Dust

Expert
Licensed User
Longtime User
Me esta costando dar con un ejemplo valido. La libreria Phone se ejecuta bien pero no parece que me indique "intensidad" de la señal.
Oparra sugirió bibliotecas específicas, ¿las has probado?
 

cas6678

Active Member
Licensed User
Longtime User
Si.

Con PhoneStateListener es el ejemplo que he puesto y no logro hacer funcionar, y la que me decias tu va bien pero no me permite conocer la intensidad, es mas acerca del propio dispositivo que de la red
 
Top