简体   繁体   English

如何在 Android 中使用机会订阅?

[英]How to work with an Opportunistic Subscription in Android?

I want to make use of the Opportunistic Subscription as part of the SubscriptionManager in Android.我想在 Android 中使用 Opportunistic Subscription 作为 SubscriptionManager 的一部分。

Two questions:两个问题:

  1. Where can I find more documentation for the Opportunistic Subscription?在哪里可以找到机会订阅的更多文档? I only see some info here https://developer.android.com/reference/android/telephony/SubscriptionManager我只在这里看到一些信息https://developer.android.com/reference/android/telephony/SubscriptionManager
  2. It seems I need permissions看来我需要权限
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EMBEDDED_SUBSCRIPTIONS" />
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"/>

But this requires the application to be a System App.但这要求应用程序是一个系统应用程序。 Is this then at all feasible?这完全可行吗?

Kind regards Jens Buysse亲切的问候 延斯·比瑟

@Jens Buysse @Jens Buysse

To answer your questions回答你的问题

  1. Android developer subscription manager documentation have very good information regarding the Opportunistic Subscription, You can know more about the Opportunistic subscription APIs by checking Telephony manager as well https://developer.android.com/reference/android/telephony/TelephonyManager Android developer subscription manager documentation 有关于机会订阅的非常好的信息,您可以通过检查电话管理器以及https://developer.android.com/reference/android/telephony/TelephonyManager了解更多关于机会订阅 API

  2. Yes, your app needs to be an system app with all the privileged permissions and system permissions to leverage the Opportunistic subscription API's.是的,您的应用程序需要是具有所有特权权限和系统权限的系统应用程序才能利用 Opportunistic 订阅 API。 on top of that you need carrier privileges' as well for your application to work.最重要的是,您还需要运营商特权才能使您的应用程序正常工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM