<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Blockchain - Analyse the Infineon Android Demo App - part a: Detect Card</title><link>/technologies/internet-of-things/b/blog/posts/blockchain---analyse-the-infineon-android-demo-app---part-a-detect-card</link><description>This post is part of the Infineon Blockchain Starter Kit road test.
Blockchain - outside of the bitcoin context - is new to me.
Follow along with me on this path to learn the technology....
 
 




Let&amp;#39;s dive further into the example Androi...</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Blockchain - Analyse the Infineon Android Demo App - part a: Detect Card</title><link>https://community.element14.com/technologies/internet-of-things/b/blog/posts/blockchain---analyse-the-infineon-android-demo-app---part-a-detect-card</link><pubDate>Sun, 15 Mar 2020 15:27:24 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:eb9ab995-2e97-4ebf-aa9d-276dc82fc9b0</guid><dc:creator>Jan Cumps</dc:creator><slash:comments>0</slash:comments><description>&lt;p&gt;an update on how the 3 action buttons are enabled or disabled:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;There&amp;#39;s a thread running that regularly calls this method:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;[embed:dc8ab71f-3b98-42d9-b0f6-e21e02a0f8e2:3ef06e6b-9b7d-4651-b12d-db8be7f5e991:type=java&amp;amp;text=++++public+void+updateEuroPrice%28%29+throws+Exception+%7B%0A++++++++if+%28ethBalance+%3D%3D+null%29%0A++++++++++++return%3B%0A%0A%0A++++++++Log.d%28TAG%2C+%22reading+EUR%2FETH+price..%22%29%3B%0A++++++++TransactionPriceBean+transactionPriceBean+%3D+coinfinityClient.readEuroPriceFromApiSync%28%220%22%2C+%220%22%2C%0A++++++++++++++++ethBalance.getEther%28%29.toString%28%29%29%3B%0A++++++++Log.d%28TAG%2C+String.format%28%22reading+EUR%2FETH+price+finished%3A+%25s%22%2C+transactionPriceBean%29%29%3B%0A++++++++if+%28transactionPriceBean+%21%3D+null+%26%26+pubKeyString+%21%3D+null%29+%7B%0A++++++++++++this.runOnUiThread%28%28%29+-%3E+%7B%0A++++++++++++++++balance.setText%28String.format%28%22%25s%25s%22%2C+ethBalance.toString%28%29%2C%0A++++++++++++++++++++++++String.format%28Locale.ENGLISH%2C+%22%5CnEuro%3A+%25.2f%22%2C+transactionPriceBean.getPriceInEuro%28%29%29%29%29%3B%0A++++++++++++++++if+%28%21sendEthBtn.isEnabled%28%29%29+%7B%0A++++++++++++++++++++sendEthBtn.setEnabled%28true%29%3B%0A++++++++++++++++++++sendErc20Btn.setEnabled%28true%29%3B%0A++++++++++++++++++++votingBtn.setEnabled%28true%29%3B%0A++++++++++++++++%7D%0A++++++++++++++++displayOnUI%28GuiState.BALANCE_TEXT%29%3B%0A++++++++++++%7D%29%3B%0A++++++++%7D%0A++++%7D]&lt;/p&gt;&lt;div&gt;&lt;/div&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;If it manages to contact the blockchain and has a known card id, the 3 function buttons are enabled:&lt;/p&gt;&lt;p&gt;&lt;span&gt;[View:/resized-image/__size/369x413/__key/commentfiles/f7d226abd59f475c9d224a79e3f0ec07-eb9ab995-2e97-4ebf-aa9d-276dc82fc9b0/contentimage_5F00_193409.png:369:413]&lt;/span&gt;&lt;/p&gt;&lt;img src="https://community.element14.com/aggbug?PostID=8858&amp;AppID=27&amp;AppType=Weblog&amp;ContentType=0" width="1" height="1"&gt;</description></item></channel></rss>