Android App Billing per Account - android

How to set app billing to buy app just once per account ??
Can't find any examples with such situation. If possible provide some external links to see.

When you say 'upgrade' you mean within the app, meaning the user has already downloaded the app for free.
This could be accomplished by in app purchases (tied to Google account if you're using the Google Play API) or by purchasing a separate app (i.e. PRO version) which interfaces with the current app.
Here's the docs for in app purchases:
http://developer.android.com/google/play/billing/billing_overview.html
And here's another SO question if you want to go the PRO/unlocker route:
How can I use the paid version of my app as a "key" to the free version?

Related

iOS/Android pay licence to use app

I am developing an application for iOS and Android and this app will be free on the store, but to use all features of the app, the user will need to pay a licence every month/year and if he doesn't pay it, he will have only a limited access to the app, with just few features. Moreover, the first month after he registers, he will have full access.
To pay the licence, it'll can be done in the app or on the website.
For that, do I need to develop a function to check on each connection my database to see if the user has paid, or is there already something done. I have look for "in app purchasing" but it seems that it works only for app where we pay once to have full features, and not every month.
Thank you :)
Regards,
There is a system in in-app-purchase for this, just check the url: https://support.apple.com/en-gb/HT202023 and "Auto-renewing subscriptions" tab
you can go for in app purchase / in app billing
iOS,
In-App Purchase lets you sell a variety of items directly within your free or paid app, including premium content, virtual goods, and subscriptions. And just like apps you sell on the App Store, you receive 70% of the purchase price.
https://developer.apple.com/in-app-purchase/
Android
Use In-app Billing to sell digital goods, including one-time items and recurring subscriptions.
Supported for any app published on Google Play. You only need a Google Play Developer Console account and a Google payments merchant account.
Checkout processing is automatically handled by Google Play, with the same look-and-feel as for app purchases.
http://developer.android.com/google/play/billing/billing_overview.html

How to prevent android app being downloaded outside google play

I'm developing an app for android. Nowadays there is a lot of stores that illegally distribute android paid apps by free.
Is there any snippet of code could I write to prevent my android app being downloaded from any other store which is not google play? For example, when the user try to open the app,Showing a message like "You need to buy this app in google play" and then close the app?
Check packageInstallerName
The simplest way to check if your app was downloaded from Google Play is to check if packageInstallerName is empty as in example below:
String installer = getPackageManager().getInstallerPackageName(
"com.example.myapp");
if (installer == null) {
// app was illegally downloaded from unknown source.
}
else {
// app was probably installed legally. Hooray!
}
but as we read here: https://stackoverflow.com/a/36299631/4730812
You should not use PackageManager#getInstallerPackageName to check if the app was installed from Google Play or for licensing purposes for the following reasons:
1) The installer packagename can change in the future. For example, the installer package name use to be
"com.google.android.feedback" (see [here][2]) and now it is
"com.android.vending".
2) Checking the installer packagename for piracy reasons is equivalent to using Base64 to encrypt passwords — it's simply bad
practice.
3) Users who legally purchased the app can side-load the APK or restore it from another backup application which doesn't set the
correct installer packagename and get a license check error. This will
most likely lead to bad reviews.
4) Like you mentioned, pirates can simply set the installer packagename when installing the APK.
So there's only two good ways to prevent Android app being downloaded outside Google Play Store:
Adding licence to your app;
Basically ensures that the application has been bought by the user using device:
Android Reference:
https://developer.android.com/google/play/licensing/index.html
Setting Up for Licensing
Adding Licensing to Your App
In-app Billing
Make your application free and add built-in purchases.
In-app Billing is a Google Play service that lets you sell digital
content from inside your applications. You can use the service to sell
a wide range of content, including downloadable content such as media
files or photos, virtual content such as game levels or potions,
premium services and features, and more. You can use In-app Billing to
sell products as:
Standard in-app products (one-time billing), or
Subscriptions (recurring, automated billing)
When you use the in-app billing service to sell an item, whether it's
an in-app product or a subscription, Google Play handles all checkout
details so your application never has to directly process any
financial transactions. Google Play uses the same checkout backend
service as is used for application purchases, so your users experience
a consistent and familiar purchase flow.
Any application that you publish through Google Play can implement
In-app Billing.
Android Reference:
In-app Billing
Implementing In-app Billing
Preparing Your In-app Billing Application
Hope it will help

Android in app billing how and where to specify paid feature charges

Can anyone explain how does in-app billing process works for Android?
Do I need to upload two different apk (free and paid) to Play store and link buy button click in free app to paid version on Play store, but in this case will free app get replaced with paid app when user purchases paid one? How to achieve this?
If I give buy button in my free app which enabled purchase of paid full version (extra features) then how does this purchase works? Is it that upon activity startup I get some event when will tell me if app is purchased or not. Based of which I can enable paid features in my code. If yes Will this kind of logic work when user is offline? and how?
Appreciate if someone could clear my confusion with sample code. I have successfully run Google's sample code but not able to understand if I upload my app as free app how and when do I need to mention amount paid features?
Do I need to upload two different apk (FREE & paid) to play store .
This depends on the use case. If you want to give your users different app that has limited and Pro features that differs majorly then you should put two different apk's in market.
Otherwise , If your app has Free and Paid content you should include In-App purchases.
in this case will free app get replaced with paid app when user
purchases paid one ? How to achieve this.
No , Your app won't get replaced , you will only get payment successful/failed response from Google play , you have to save that information in your app shared preferences and manage your app flow accordingly.
If I give buy button in my free app which enabled purchase of paid
full version (extra features) then how does this purchase works?
Your application accesses the In-app Billing service using an API that is exposed by the Google Play app that is installed on the device. The Google Play app then conveys billing requests and responses between your application and the Google Play server. In practice, your application never directly communicates with the Google Play server for purchases. Instead, your application sends billing requests to the Google Play application over interprocess communication (IPC) and receives responses from the Google Play app. Your application does not manage any network connections between itself and the Google Play server.
If yes Will this kind of logic work when user is offline? and How.
To complete in-app purchase requests, the Google Play app must be able to access the Google Play server over the network. But after initiating a purchase request , you can save your payment response in shared preference for maintaining offline status.
Appreciate if someone could clear my confusion with sample code. I
have successfully run google's sample code but not able to understand
You should first start by reading the API docs Google Play In-app Billing and Selling In-app Products ,
if I upload my app as free app how and when do I need to mention
amount paid features ?
After that follow the steps to create In-App products on Google play account and run the API sample for those products.(There are plenty of tutorials online). Also you can take a look at official website for Establishing In-app Billing Products for Sale
Enjoy!

Android app having a marketplace within the app

I've been going through a design for an app I wish to be making soon. My app will rely on user generated content. Is it possible to have users add an item to this in-app marketplace and recieve payments when other users buy from them directly using Google Wallet or PayPal? Is there a recommended way of implementing this type of feature?
Thanks in advance!
I am not aware of any recommended way to do this, however, doing this your app will likely not be allowed to be uploaded to the Google Play Store.
This would be against Google's Terms of Service as a developers apps is not allowed to make money through other means and other purchases that are made within the app have to go via the Google Play.

In-App billing get if the user purchased the app before it was free

I want to be able to get the state of the user purchases but on the current app they are in from when it was paid to free.
For example App SuperCars was paid app but the latest update makes it free with in-app purchases. I want previous users who paid for the app to have access to paid content but new users to have no access in which they would need to pay.
Can anyone give me an example of how I would do this? How do I get the user paid sate??
After looking around and contacting certain people I've found out that it's not supported by Google, I'm disappointed at the developing Apps for Google Play, lots of features still missing.
Think about it, essentially you have launched a new product. Its not the same product, its a modified more useful product. Infact you should release this as a different product, different package, and check if your other product is also installed. If yes, provide the in app features free. Let both products coexist.
One more way is to update the older product (with a bug fix) that broadcasts its "paid" status. Then when you install the new app (free with inapp purchases) you can know that they have already paid for the app.
But if they have uninstalled the older app, then they have to install the older app to use it free.
So essentially you customers have 2 choices
Install the older product, pay for it. And install and use the 2nd product free.
Install the newer product and use in-app purchases.
DONT look for a way for google play to give you a status of a user's paid progress of a previous version of the app. Sorry, this looks like a crazy api to implement (even for google :)).

Categories

Resources