0

Given that you're a carrier app (defined by https://source.android.com/devices/tech/config/carrier), what's the correct way to add APNs for devices on api 28 or higher?

The Android documentation talks about how to submit AOSP patches to add your APNs to the AOSP codebase, but that's not really interesting for a carrier app. (It's not that it's wrong, since a carrier often can and should do this. It's just that the timeline isn't at all helpful; a carrier app needs to add APNs immediately, not years from now when the AOSP code makes it into shipping devices.)

There are questions from a long time ago (almost a decade for Create Network Access Point Name with code,), but that can't be the modern way to do it, especially since there are now APIs like ApnSetting.Builder.

James Moore
  • 8,636
  • 5
  • 71
  • 90

1 Answers1

0

Google responded to the bug I filed (https://issuetracker.google.com/issues/160269621) and updated the documention. It now covers adding an APN (https://source.android.com/devices/tech/config/carrier#adding_apn):

Adding APNs with a carrier app To add APNs programmatically from a carrier app (for example, during SIM activation), use ContentResolver APIs to add APN items to a content provider identified by the URI android.provider.Telephony.Carriers.CONTENT_URI. For more information about the table structure for the content URI, see Telephony.Carriers.

For more information, see APN and CarrierConfig.

James Moore
  • 8,636
  • 5
  • 71
  • 90