Questions tagged [android-subscriptionmanager]

Android SubscriptionManager is the application interface to SubscriptionController and provides information about the current Telephony Subscriptions.

Android SubscriptionManager is the application interface to SubscriptionController and provides information about the current Telephony Subscriptions. This class was added in API level 22 .

Instances of this class must be obtained using Context.getSystemService(Class) with the argument SubscriptionManager.class or Context.getSystemService(String) with the argument Context.TELEPHONY_SUBSCRIPTION_SERVICE.

Official Page

16 questions
8
votes
2 answers

How long does a Subscription ID stick around in Android?

Starting on API Level 22, there is native support in Android for Dual-SIM devices. At the center of the APIs, there is SubscriptionInfo.getSubscriptionId(). Using these IDs, you can retrieve SmsManagers for each respective SIM card to send SMS and…
AxiomaticNexus
  • 6,190
  • 3
  • 41
  • 61
7
votes
1 answer

Unable to Send Test Notification From Real-time developer notifications in Google Play Console

I have followed these steps: Go to Google Cloud Console and create/select a project. On the header, click to open the menu and select ‘Pub/Sub’, or click https://console.cloud.google.com/cloudpubsub/topic/list Create/select a topic. Add the service…
7
votes
5 answers

How to get the mobile number of my device programmatically?

I have tried using 2 methods for retrieving my phone number but both of them don't work. I used: TelephonyManager SubscriptionManager I do get Network name, Country iso, and IMEI but whenever I try to return Number it returns nothing. I have also…
5
votes
1 answer

SubscriptionManager.from() Deprecated

Previously we used to get instance of SubscriptionManager using SubscriptionManager subscriptionManager=SubscriptionManager.from(this); butSubscriptionManager.from(context) is deprecated in API 28 , what's the new way to get SubscriptionManager…
Manohar
  • 22,116
  • 9
  • 108
  • 144
3
votes
1 answer

why getActiveSubscriptionInfoList is getting empty for some android 11 devices?

I need to find out device SIM card is present or not(including duel sim devices). So that I have tried Subscription Manager getActiveSubscriptionInfoList API, but it is returning empty for certain android 11 devices. Information: Slot 1 has a SIM…
3
votes
0 answers

We are unable to change your subscription plan. Manage subscriptions in android application

Im using in-app subscription in my application. there are 3 subscription available in application i.e, monthly, 6 month and yearly. If user subscribed with monthly I'm showing upgrade subscription on some point. If user try to upgrade its upgrading…
2
votes
0 answers

Needed clarification for cancelReason from Resource: SubscriptionPurchase

We are working on back-to-back service. To obtain the sub status we leverage the standard API call (Resource: SubscriptionPurchase) to get the current sub state. The most challenge scenario we are blocked with is what the proper way interpreting…
0
votes
0 answers

Can I use Third party Payment Gateway (eg. Paytm, Razorpay) for In-app Purchases and Subscription in my Android App in India ? Please explain

I want to integrate payment gateways like paytm or upi for In-app subscriptions in my Android app. I saw many educational apps do this. But I should give Google their share right ? How to do it the correct way ? I don't know. Please someone help. I…
0
votes
0 answers

Android subscriptionManager.getActiveSubscriptionInfoList returns null in AAOS 10 but works in AAOS 12

When i pair an iPhone to a device running AAOS12, and I enable "Show Notifications" on the iPhone's bluetooth connection to the device, I am able to see an entry in the list returned by SubscriptionManager.getActiveSubscriptionInfoList(). However,…
0
votes
0 answers

Android: Get multiple enabled profile details

I have a pixel 7 with Mep enabled and i am trying to read this data in my app. I have a physical Sim in a Work profile and an eSim in a Personal profile. I tried the below code in my MainActivity's onCreate: val smanager =…
0
votes
0 answers

eSIM profile disabling issues on Android since API level 33

We are developing an application that downloads and manage eSIM profiles. Since Android 13, we have an issue when compiling the app to API level 33. Reproduced on Pixel 7 and Samsung S20. From Android 13, the switchToSubscription method has a…
0
votes
1 answer

telephonyManager.getAllCellInfo() and subscriptionManager.getActiveSubscriptionInfoList() both returns different mnc (mobile Network code)

I'm trying to get the signal strength of dual sims it works absolutely fine on most of the phones but for some phones (same android version [11] but different geographic location) the MNC code what we receive from…
0
votes
1 answer

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. Two questions: Where can I find more documentation for the Opportunistic Subscription? I only see some info here…
Jens Buysse
  • 119
  • 10
0
votes
1 answer

Unable to get the all active subscriptions from Google Play

Please help me to figure out what I'm missing. I have an Android App which has a few subscriptions products, in total we have 5 subscriptions (two in use, the rest for internal purposes), all of the are active and have the same configuration…
0
votes
1 answer

get or set selected default sim card if the user has a dual sim

I have seen this post from 2012 and it has outdated answers. Until around 2015 Android natively supported multiple sim cards in API 22. I heard about SubscriptionManager but I am not quite familiar with it, how can I get and dynamically set the…
jbmcle
  • 771
  • 3
  • 12
1
2