-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a display overlay on the map with current serving cell information
- Need to handle SIM swaps while on the map and also signal info from multiple subscriptions
- Loading branch information
1 parent
da5a6a6
commit 74b1cee
Showing
6 changed files
with
303 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
networksurvey/src/main/java/com/craxiom/networksurvey/ui/cellular/model/ServingSignalInfo.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package com.craxiom.networksurvey.ui.cellular.model | ||
|
||
import com.craxiom.networksurvey.model.CellularProtocol | ||
import java.io.Serializable | ||
|
||
data class ServingSignalInfo( | ||
val cellularProtocol: CellularProtocol, | ||
val signalOne: Int, | ||
val signalTwo: Int, | ||
) : Serializable { | ||
override fun toString(): String { | ||
val protocolSpecificIdentifier = when (cellularProtocol) { | ||
CellularProtocol.GSM -> "RSSI: $signalOne" | ||
CellularProtocol.CDMA -> "ECIO: $signalOne" | ||
CellularProtocol.UMTS -> "RSSI: $signalOne\nRSCP: $signalTwo" | ||
CellularProtocol.LTE -> "RSRP: $signalOne\nRSRQ: $signalTwo" | ||
CellularProtocol.NR -> "SS-RSRP: $signalOne\nSS-RSRQ: $signalTwo" | ||
else -> "Unknown: $signalOne" | ||
} | ||
return protocolSpecificIdentifier | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.