Skip to main content
Solved

Subscriptions valid for one device not 100 devices on one subscription ?

  • 2 December 2021
  • 6 replies
  • 321 views

Forum|alt.badge.img+5

I have worked for businesses where all their employees use the same google play account to install apps, how can you setup a subscription so one subscription allows one device rather than pay once and use the same app on 100 devices ?

Im sure this question must have been asked before so I’m hoping this can be done.

Many thanks

Best answer by ryan

Seems related to this post: 

 

However, if you do not have a login system where you’re getting the App User ID from your authentication system, you may be able to simplify what you’re after by generating a UUID for each install and setting that as the App User ID. Then if 100 ppl logged in with the same Google Play account on 100 devices, each one would still have a unique App User ID, and each customer would need to restore purchases to “transfer” the subscription to their account which would remove it from anyone else.

View original
Did this post help you find an answer to your question?

6 replies

ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • Answer
  • December 2, 2021

Seems related to this post: 

 

However, if you do not have a login system where you’re getting the App User ID from your authentication system, you may be able to simplify what you’re after by generating a UUID for each install and setting that as the App User ID. Then if 100 ppl logged in with the same Google Play account on 100 devices, each one would still have a unique App User ID, and each customer would need to restore purchases to “transfer” the subscription to their account which would remove it from anyone else.


Forum|alt.badge.img+5
  • Author
  • Helper
  • 13 replies
  • December 2, 2021

Im not using a login system, Is there an instruction sheet on this Ryan to set this up in revenueCat?


Forum|alt.badge.img+5
  • Author
  • Helper
  • 13 replies
  • December 2, 2021

Im thinking If i go with this example below

private static String uniqueID = null;
private static final String PREF_UNIQUE_ID = "PREF_UNIQUE_ID";

public synchronized static String id(Context context) {   
	if (uniqueID == null) {      
		SharedPreferences sharedPrefs = context.getSharedPreferences(PREF_UNIQUE_ID, Context.MODE_PRIVATE);      
		uniqueID = sharedPrefs.getString(PREF_UNIQUE_ID, null);      
		if (uniqueID == null) {         
			uniqueID = UUID.randomUUID().toString();         
			Editor editor = sharedPrefs.edit();         
			editor.putString(PREF_UNIQUE_ID, uniqueID);         
			editor.commit();      
		}   
	}    
	return uniqueID;
}

If I generate a UUID on a sale and store it in preferences and at the same time use the UUID on the sale details.

I believe in the checkForProEntitlement function I should be able to check for the same UUID being returned from revenueCat to support this is a valid subscribed device, otherwise the new device would need to subscribe so in essence thats one subscription per device. 

Now I need one of those magic reveneCat step by step documents to make that bit more obvious what I send to revenueCat and have to extract the UUID from the checkForProEntitlement

Hope this makes complete sense !!

Thank you


Forum|alt.badge.img+5
  • Author
  • Helper
  • 13 replies
  • December 2, 2021

Finally figured out how to do this no doubt I will find out if its working correctly once people start to subscribe to the app.

 


ryan
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 391 replies
  • December 8, 2021

Hey @appstrader let us know if this works! How are you associating the UUID in shared preferences with the transaction in RevenueCat?


Forum|alt.badge.img+5
  • Author
  • Helper
  • 13 replies
  • January 5, 2022

Sorry never seen any replies, 

Basically I use the code generated by the purchasing device, then check this number when the app is started if the code does not match keep the app in an unsubscribed state, 

 

As only one device has the magic key and it cant be passed to the other clients so only one client will only ever be subscribed other devices will never sign into the subscription state due to the locked key.


Did this post help you find an answer to your question?

Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings