How to run this method?
public void requestCellInfoUpdate (Executor executor,
TelephonyManager.CellInfoCallback callback)
My code:
TelephonyManager tm = (TelephonyManager)this.GetSystemService(TelephonyService);
tm.RequestCellInfoUpdate(MainExecutor, new TelephonyManager.CellInfoCallback());
new TelephonyManager.CellInfoCallback()) - this is a problem with that, but I don't know. How to start it and what to enter? From what I can see it's an abstract class?
I can't find anything in the Xamarin documentation. And in the Adnroid documentation, I found that it is necessary to call it from API29 to refresh the information.
Apps targeting Android Q or higher will no longer trigger a refresh of the cached CellInfo by invoking this API. Instead, those apps will receive the latest cached results, which may not be current. Apps targeting Android Q or higher that wish to request updated CellInfo should call requestCellInfoUpdate(); however, in all cases, updates will be rate-limited and are not guaranteed. To determine the recency of CellInfo data, callers should check CellInfo#getTimeStamp().