Get started

WalletDroid is currently in closed beta. To sign up for it please fill in the form below:

Which payment gateways would you like to use:

Usage guidelines

WalletDroid UI

Typical WalletDroid screen consists of:

  1. Item name
  2. Calling application name
  3. Calling application icon or a descriptive icon for the item
  4. Payment gateway used to process the transaction
  5. Grand total of the transaction
  6. Miscellaneous info about the transaction/item

The values for items 1-3 can be anything, but it is good to stick with the defaults, as it gives the end user a better experience when using WalletDroid.

If the payment gateway supports displaying miscellaneous information, then it should be mentioned that the screen space is limited, and you should take that into account when setting the extra details.

Integration details

After having been chosen to participate in the beta you will receive an email with the link to WalletDroidLib.jar. To include it in your project Eclipse you need to right click on your project in the Package Explorer and select Properties. From the dialog that pops up you need to go to Java Build Path → Libraries and click on the "Add External JARs.." button and select the WalletDroidLib.jar file.

The integration itself is very easy, the following code demonstrates what has to be done to invoke WalletDroid:

// Usually called in the Activity.onCreate method:
WalletLauncher wallet = new WalletLauncher(this);
// To create the transaction:
MbTransaction trans = new MbTransaction();
trans.PayToEmail = "your@email.com";
trans.Amount = 1.23f;
trans.Currency = MbCurrency.EURO;
trans.Detail1Description = "DRM:";
trans.Detail1Text = "Yes";
trans.Detail2Description = "Refundable:";
trans.Detail2Text = "No";
wallet.open("Moby Dick Ebook", trans);

And that is how it is done.

You might also want to know if the transaction was cancelled or completed by the user. In that case you need to put the following code in the Activity.onActivityResult:

if (requestCode == wallet.getRequestCode())
{
	if(resultCode == WalletLauncher.RESULT_SUCCESS)
	{
		// Transaction completed.
	}
	if (resultCode == 0)
	{
		// Transaction cancelled.
	}
}

However you should note that this only tells you that the transaction was sucessfully posted to the gateway, but it does not guarantee that the money has reached your account. You should always use the status url notification services provided by the gateways to make sure that you have received your money.

© 2010 Mart Roosmaa Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions.