Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Credit Card information isn't really stored "on the device." In the case of devices that are connected to the Play Store, Google account credentials are stored and payments are made through Google Wallet. I don't have a lot of experience with other types of devices, but I imagine they all work in a similar fashion, for example a Kindle Fire will keep Amazon account credentials, etc.</p> <p>If you're looking to create an application that provides in-app purchases and will be available on the Play Store, <a href="http://developer.android.com/google/play/billing/billing_overview.html" rel="nofollow noreferrer">you can click here to read about Google's In-App Billing API that allows your users to use their Google Wallet to make payments.</a> For Kindle Devices, <a href="https://developer.amazon.com/sdk/in-app-purchasing.html" rel="nofollow noreferrer">Amazon has a similar API.</a></p> <p>It would be a pretty major security concern if arbitrary apps had access to the device owner's credit card information. If you're writing an app that you intend to distribute outside of a reputable app store and therefore without a built-in in-app purchase api, you're going to have to use your own payment mechanism. If this is the case, I wouldn't recommend creating your own. I believe PayPal has an Android API, and a quick Google search came up with a few other less notable brands that offer this service, though if you do intend to use the Play Store or Amazon's app store, using a 3rd party payment API usually goes against their terms of service.</p> <p>Edit: The <a href="http://developer.android.com/reference/android/accounts/AccountManager.html" rel="nofollow noreferrer">AccountManager</a> class allows you to view info about accounts on the device, however, I don't believe that you can use it to discover if the user has a payment method set up through Google Wallet. <a href="https://stackoverflow.com/questions/2720315/what-should-i-use-android-accountmanager-for">I found this SO question that goes into detail about what the AccountManager can be used for.</a> If this is a Play Store app, I'd look into the Google In-App Billing API, it's probably the best option for what you're trying to do.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload