Created
August 8, 2012 08:23
-
-
Save codinguser/3293391 to your computer and use it in GitHub Desktop.
Creating accounts and transactions in GnucashMobile using Intents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent intent = new Intent(Intent.ACTION_INSERT); | |
intent.putExtra(Intent.EXTRA_TITLE, "Intent Account"); | |
intent.putExtra(Intent.EXTRA_UID, "intent-account"); | |
intent.putExtra("org.gnucash.android.extra.currency_code", "EUR"); | |
intent.setType("vnd.android.cursor.item/vnd.org.gnucash.android.account"); | |
sendBroadcast(intent); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Intent transactionIntent = new Intent(Intent.ACTION_INSERT); | |
transactionIntent.setType("vnd.android.cursor.item/vnd.org.gnucash.android.transaction"); | |
transactionIntent.putExtra(Intent.EXTRA_TITLE, "Transaction intents"); | |
transactionIntent.putExtra(Intent.EXTRA_TEXT, "You can do this too!"); | |
transactionIntent.putExtra("org.gnucash.android.extra.amount", 4.99); | |
transactionIntent.putExtra("org.gnucash.android.extra.account_uid", "intent-account"); | |
sendBroadcast(transactionIntent); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment