Read Preferred Network Type Setting
<p>I am trying to read the <code>Preferred network type</code> setting from the device. But nowhere android API's are available.</p>

<p>Use case: 
Trying to read the Preferred network type and connected network type so that if the device has LTE enabled and the user is forcefully switched back to the lower network(3G,2G); then there should be a notification sent to the user.</p>

<p>I have checked the system setting code, But it's deprecated.</p>

<pre><code>Settings.Secure.getString(getApplicationContext().getContentResolver(),
                        Settings.System.NETWORK_PREFERENCE);
</code></pre>

<p>Is there any alternate way to read the system secured settings(By reflection?).
And Also is it possible to write back the setting with the user permission?</p>

<p>Help is much appreciated.</p>