My application works fine on Android 5.0 and below, but when I tried to run it on a device with Android 6.0 or higher, I got this error:
Writing exception to parcel
java.lang.SecurityException: No permission to write APN settings
at com.android.providers.telephony.TelephonyProvider.checkPermission(TelephonyProvider.java:4058)
at com.android.providers.telephony.TelephonyProvider.query(TelephonyProvider.java:2724)
at android.content.ContentProvider.query(ContentProvider.java:1058)
at android.content.ContentProvider$Transport.query(ContentProvider.java:245)
at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
at android.os.Binder.execTransact(Binder.java:453)
Any help would be appreciated.
Maybe you're not getting permission in runtime. so do this