Is there any way to simulate changes in signal strength on the android emulator. I have a phonestatelistener logging signal strength in my app. I'm also using telnet to the emulator and commands like gsm signal 5 5, but I keep getting 99 as my rssi signal strength and -1 as the bit error rate.
I think it's good idea to mock with interface in such cases
interface SignalInformation{
float signalStrength();
//etc...
}
Create some dummy class for mocking, and then change it to real working class.
class MockSignal implements SignalInformation{
public float signalStrength(){
return 3.5; //or whatever behaviour you want (i.e. random number)
}
}
Well, I hope you got the idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With