public AndroidSmsProbe() { _smsOutgoingObserver = new AndroidSmsOutgoingObserver(Application.Context, outgoingSmsDatum => { // the observer doesn't set the from number outgoingSmsDatum.FromNumber = _telephonyManager.Line1Number; StoreDatum(outgoingSmsDatum); }); _incomingSmsCallback = (sender, incomingSmsDatum) => { // the observer doesn't set the destination number (simply the device's primary number) incomingSmsDatum.ToNumber = _telephonyManager.Line1Number; StoreDatum(incomingSmsDatum); }; }
public AndroidSmsProbe() { _smsOutgoingObserver = new AndroidSmsOutgoingObserver(Application.Context, outgoingSmsDatum => { // the observer doesn't set the from number outgoingSmsDatum.FromNumber = _telephonyManager.Line1Number; StoreDatum(outgoingSmsDatum); }); _incomingSmsCallback = (sender, incomingSmsDatum) => { // the observer doesn't set the destination number (simply the device's primary number) incomingSmsDatum.ToNumber = _telephonyManager.Line1Number; StoreDatum(incomingSmsDatum); }; }
public AndroidSmsProbe() { _smsOutgoingObserver = new AndroidSmsOutgoingObserver(async outgoingSmsDatum => { // the observer doesn't set the from number (current device) outgoingSmsDatum.FromNumber = _telephonyManager.Line1Number; await StoreDatumAsync(outgoingSmsDatum); }); _incomingSmsCallback = async(sender, incomingSmsDatum) => { // the observer doesn't set the destination number (simply the device's primary number) incomingSmsDatum.ToNumber = _telephonyManager.Line1Number; await StoreDatumAsync(incomingSmsDatum); }; }