{"id":596,"date":"2011-06-20T20:16:10","date_gmt":"2011-06-20T19:16:10","guid":{"rendered":"http:\/\/www.owlfish.com\/weblog\/?p=596"},"modified":"2011-06-20T20:16:50","modified_gmt":"2011-06-20T19:16:50","slug":"expenseclam-finding-the-currency","status":"publish","type":"post","link":"https:\/\/www.owlfish.com\/weblog\/2011\/06\/expenseclam-finding-the-currency\/","title":{"rendered":"ExpenseClam &#8211; finding the currency"},"content":{"rendered":"<div id=\"attachment_606\" style=\"width: 243px\" class=\"wp-caption alignright\"><a href=\"http:\/\/owlfish.com\/weblog-media\/2011\/06\/stair-case.jpg\"><img aria-describedby=\"caption-attachment-606\" loading=\"lazy\" class=\"size-full wp-image-606\" title=\"Click for larger view\" src=\"http:\/\/owlfish.com\/weblog-media\/2011\/06\/stair-case-small.jpg\" alt=\"Stair case\" width=\"233\" height=\"350\" srcset=\"https:\/\/owlfish.com\/weblog-media\/2011\/06\/stair-case-small.jpg 233w, https:\/\/owlfish.com\/weblog-media\/2011\/06\/stair-case-small-199x300.jpg 199w\" sizes=\"(max-width: 233px) 100vw, 233px\" \/><\/a><p id=\"caption-attachment-606\" class=\"wp-caption-text\">Stair case<\/p><\/div>\n<p>Yesterday I released <a title=\"ExpenseClam (Ad Supported Version)\" href=\"https:\/\/market.android.com\/details?id=com.owlfish.expenseslite\">ExpeneseClam<\/a>, a business expenses tracking app for Android.\u00a0 Recording expenses on a smartphone can be a painful experience, typos are common, expense claims are not always made in chronological order, and there is usually little time to note down how much a taxi cost.\u00a0 ExpenseClam has a number of features to help make this easier.\u00a0 Simple things like auto-suggesting expense descriptions based on the amount entered can make it much quicker to record common recurring expenses.<\/p>\n<p>One of the niftiest features in ExpenseClam is something that you will only stumble across if you travel a lot: it auto selects the default currency for a new expense based on the country you are in.\u00a0 This is done without needing user permission to determine location, carry out reverse geocoding or even internet access.<\/p>\n<p>The secret sauce is Android&#8217;s TelephonyManager and it&#8217;s method <a title=\"API Documentation\" href=\"http:\/\/developer.android.com\/reference\/android\/telephony\/TelephonyManager.html#getNetworkCountryIso%28%29\">getNetworkCountryIso()<\/a>.\u00a0 This method returns the ISO code given by the mobile operator for the network that you are connected to (the Mobile Country Code).\u00a0 From this a Locale object can be created, which then allows the Currency instance to be created.\u00a0 None of this requires network traffic and it takes very little processing power to complete.<\/p>\n<p>Changes in the default currency only happens when the country changes.\u00a0 This is to avoid frustrating users who have to enter expenses in a different currency to this default.\u00a0 The country derived currency is however prioritised in the list of currencies to make selection easier for what is likely to be a common choice.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I released ExpeneseClam, a business expenses tracking app for Android.\u00a0 Recording expenses on a smartphone can be a painful experience, typos are common, expense claims are not always made in chronological order, and there is usually little time to note down how much a taxi cost.\u00a0 ExpenseClam has a number of features to help [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[15],"tags":[14,21],"_links":{"self":[{"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/posts\/596"}],"collection":[{"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/comments?post=596"}],"version-history":[{"count":11,"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/posts\/596\/revisions"}],"predecessor-version":[{"id":609,"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/posts\/596\/revisions\/609"}],"wp:attachment":[{"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/media?parent=596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/categories?post=596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.owlfish.com\/weblog\/wp-json\/wp\/v2\/tags?post=596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}