How to use a single Play Store account to purchase same subscription in different in-app accounts? - google-play

I have implemented a login feature in my app where a user can pay for subscription and have that subscription tied to their in-app login account by using the setObfuscatedAccoundId() method. However, in a scenario where the current user(user_A) makes a purchase, logs out of the app and a different user_B logs in, user_B is unable to purchase the same subscription as it has already been bought by user_A (as they share the same underlying Google Play account) even though I DON'T want these in-app accounts to be related at all. Currently, what happens is user_B gets a responses that states "You already own this item". So that makes me wonder:
Can we actually possibly use a single/the same underlying Play Store account to purchase the same subscription while logging in to an app with different user accounts?
Also, what would be an ideal design approach for a problem like this considering the limitation?
I am still a beginner at this and would really appreciate your inputs!

I'm beginner at this like you and may I was wrong but I think you can not do that because the subscriptions are saved in your google account and you can not buy same subscription you owned already.

Related

Google API Authentication for App That Only Accesses One Account

Should I use a Service Account or an OAuth 2.0 Client ID?
I'm struggling to understand Google's documentation on authenticating for their APIs. I'm creating a basic application that will help users add and modify Google Calendar events for a single Google account (the account is shared between all users). I only need the application to access that one account, it'll never need to access any others.
It seems to me that Service Account would be best for this, but Google's documentation suggests Service Accounts should only be used for automated processes (unless I'm misunderstanding). For instance this page contains the following, describing when to use Service Accounts.
Would my application qualify as acting on the users behalf?
If so, I would want to use OAuth Client ID credentials, which will ask the user to sign in to a google account. In this case, is there a way I can guarantee they only sign in to the one account I want modified?
I can't find any decent documentation on the OAuth authentication requests to figure this out myself. If there is any could you point me there?
I'm sure I'm misunderstanding something basic here, but thank you for any help!
First off you should know that you can only use service accounts with Google aclendar api if you have a google workspace domain account.
You can then set up a calendar and a domain user that the service account can act on behalf of to control the access of that calendar.
Assuming that your application is going to preform all actions on this calendar then yes i would say that you could use a service account for this. If your app bacly has a ui with a calendar on it your just using google calendar to store the data.
However if you intend to share this calendar with the users themselves, this way they could see it within their own google Calendar account. Im not sure a service account would be the way to go.
If you want the users to be able to see it and make changes then you may want to just use Oauth2. Grant them access to the calendar and then request access to their calendar account.
Drawback to that option is going to be the verification process. You will get access to all the users calendars and your going to need write access.
If you can go with a service account you really should consider it it will save you a lot of hassle with verification.

Google Sign-in identify account tied to a school

I'm using Google Sign-in to register and login users to my web app.
We are an edtech product, so I would like to make sure users are registering with a google account that is tied to a school and not using their personal google accounts.
Is this possible?
I don't see a field in user that would indicate this. I also can't find confirmation as to whether or not school google accounts can have an #gmail.com email or if they must use a custom domain.
Note that these account may or may not be using Google Classroom, so I can't rely on that.
Unless you have a List of the "school" accounts and can test against that there is no way for you to know.
Google is not going to tell you if its a school google account. They may know if its a google classroom account but that kind of information is not shared at login time. Probably due to user privacy.

Link a purchase to an apple ID

I'm implementing an in app purchase for a Non-renewing subscription in my app. I'm using an account system so I'm linking the purchase to the user account in my server. This works fine but recently I read that the purchase should be linked to an apple id. I'm a little confused because I thought you couldn't get access to an apple id. So I have some questions:
Could my app be rejected for link the purchase to an account in my system?
I read that I could use the UUID as user identifier in my server and save it in user defaults but I don't know how to identify the user if He switch devices?
If identify the user with the UUID works, I would like to control if the user logs in with the right account in my system so if he has the right UUID but a different account, He should not get access to my functionality. Is this possible or my app would be rejected for this kind of control?
Links:
In app purchase - Subscription - not based on Apple Id and How to store and fetch the response of in-app purchase in ios?
In the apple documentation saids that you should use transactions recipes for restore in case the user switch devices but in Non-renewing subscriptions the app will be responsable for the restoration process.
https://developer.apple.com/library/mac/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html#//apple_ref/doc/uid/TP40008267-CH8-SW9

Manage ads for app users

My web app is helping small businesses create content for their business pages.
I want to add the ability for my users to promote their posts.
most of my users don't have an ads account.
I can think of two options:
ask them to create an ads account
ask them to give my user an advertiser privilege for their page and use my own ads account
is there a better, more automated solution than these two options? if not, which one is preferred?
You should ask them to create their own ad account.
Shared ad account owned by you woud make it impossible for your customers to choose different payment methods, currency, contact info and other. They also wouldn't be able to generate invoices, which may be crucial for business customers.
Also you won't need to handle your customers' expenses. On a shared account I can easily imagine a case where a customer is boosting posts using your app, but doesn't pay for it. In that case you would be the one to pay the Facebook, since you'd own a shared account and you couldn't leave it without money because of other customers using it.

Google Play Store Private Channel and own domain

I just register and paid $25 USD to be able to upload an app in the Google Play Store. I used my personal email address, something like sonyaATmydomain.com. The app that I am uploading is for a different domain, e.g. hello.com. I uploaded the app and started to configure all the settings. The problem is that I did not realize that to make the app private (Private Channel) my developers email account must be the same domain as the app, e.g. sonyaAThello.com. So I added a new user with administrator permissions to the app, this new user using the correct domain, e.g. sonyaAThello.com. I logged with this new user account and I cannot see the Private Channel section. Then I logged with my personal email address user and also I couldn't see the option. Then I discovered that to see that section my setup account (the one that paid $25 USD) must be the app domain. But that is not possible. So I tried to transfer the app from my personal account to the new user domain account, BUT at this stage I doubt that is going to work. For what I have read, it seems to enable the private channel, I must have a Goggle Apps account and that is not free. Does anyone know if it is possible to setup the private channel for the play store without having to pay a Google Apps subscription and if yes what's the correct process? Unfortunately I already paid $25 USD but I can't manage to get the private channel :(, thanks a lot
Based off the documentation, it seems there is no getting around having a Google Apps for Work, Education, or Government account.
This work around may not work for you, but what you can do is publish to aplha/beta testers. This will allow you to grant access to whatever users or groups of your choosing. You do not need a production APK for aplha/beta testing, but I'm not sure if you'll be able to get other production information (analytics, ratings, etc).

Resources