<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/"><channel><title>2017-08 on Funky Si's Blog (Dev)</title><link>https://blog-dev.funkysi1701.com/2017/08/</link><description>Recent content in 2017-08 on Funky Si's Blog (Dev)</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>funkysi1701@gmail.com (Simon Foster)</managingEditor><webMaster>funkysi1701@gmail.com (Simon Foster)</webMaster><lastBuildDate>Mon, 14 Aug 2017 20:00:45 +0000</lastBuildDate><atom:link href="https://blog-dev.funkysi1701.com/2017/08/index.xml" rel="self" type="application/rss+xml"/><item><title>Pwned Pass available on Play Store</title><link>https://blog-dev.funkysi1701.com/posts/2017/pwned-pass-available-from-the-play-store/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Mon, 14 Aug 2017 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2017/pwned-pass-available-from-the-play-store/</guid><category term="Android">Android</category><category term="Mobile">Mobile</category><category term="App">App</category><category term="PwnedPass">PwnedPass</category><description>&lt;p&gt;Pwned Pass is now available from the Google Play Store.&lt;/p&gt;
&lt;p&gt;
&lt;img class="img-fluid" alt="Pwned Pass" src="https://blog-dev.funkysi1701.com/images/2017/Screenshot_20170813-205152.png" loading="lazy"
width="1080" height="1920"
/&gt;
&lt;/p&gt;
&lt;p&gt;Pwned Pass is a simple android app that allows you to type in a password and tells you if it has been used in a data breach.&lt;/p&gt;
&lt;p&gt;Troy Hunt of &lt;a href="https://haveibeenpwned.com/" target="_blank" rel="noopener noreferrer"&gt;Have I Been Pwned?&lt;/a&gt;
recently added a new API to his website which allows you to search his extensive database of pwned passwords, 306 million of them. I have simply created a Android frontend to this API.&lt;/p&gt;
&lt;p&gt;The API itself takes a SHA1 hash of the password and either returns a HTTP 200 if the password is found or a HTTP 404 if the password does not exist in the HIBP database. For more details of how Troy Hunt created this check out his &lt;a href="https://www.troyhunt.com/introducing-306-million-freely-downloadable-pwned-passwords/" target="_blank" rel="noopener noreferrer"&gt;blog post&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;My app simply generates a SHA1 hash of anything that is typed in and then passes this to Troy Hunt’s API. I then get the HTTP return code so I know if the password exists or not.&lt;/p&gt;
&lt;p&gt;It should be noted that: &lt;strong&gt;Do not send any password you actively use to a third-party service – even this one!&lt;/strong&gt; I don’t log anything that you type into my app and all I am then doing is passing a SHA1 hash over SSL to HIBP. However you shouldn’t trust my word alone.&lt;/p&gt;
&lt;p&gt;The app itself is written in Visual Studio with Xamarin Forms in a similar fashion to the app I talked about &lt;a href="https://www.funkysi1701.com/posts/2017/android-app-development-and-the-visual-studio-mobile-centre/" target="_blank" rel="noopener noreferrer"&gt;last week&lt;/a&gt;
.&lt;/p&gt;
&lt;p&gt;As I am using Xamarin Forms there is the potential that I may develop iPhone or UWP versions of this code in the future. With that in mind I have made use of interfaces for the android specific parts of the code.&lt;/p&gt;
&lt;p&gt;I also make use of the &lt;a href="https://www.nuget.org/packages/modernhttpclient/" target="_blank" rel="noopener noreferrer"&gt;modernhttpclient&lt;/a&gt;
nuget package due to problems I encountered with httpclient and SSL. This is due to limitations of what libraries are available in mono and what has been implemented, I suspect there are better ways to solve this but that is all part of the fun.&lt;/p&gt;
&lt;p&gt;Please do have a look at Pwned Pass and let me know what you think. Especially if it doesn’t work or throws errors. I would like to spend time making this app as good as I can make it.&lt;/p&gt;</description></item><item><title>Android apps with Mobile Centre</title><link>https://blog-dev.funkysi1701.com/posts/2017/android-app-development-and-the-visual-studio-mobile-centre/</link><author>funkysi1701@gmail.com (funkysi1701)</author><pubDate>Mon, 07 Aug 2017 20:00:45 +0000</pubDate><guid>https://blog-dev.funkysi1701.com/posts/2017/android-app-development-and-the-visual-studio-mobile-centre/</guid><category term="App">App</category><category term="Azure">Azure</category><category term="Android">Android</category><description>&lt;p&gt;For the past week or so I have been playing around with Xamarin and creating an android app.&lt;/p&gt;
&lt;p&gt;Well I now have an app in the Google Play Store.
&lt;img class="img-fluid" alt="Screenshot of my Android app listing in the Google Play Store" src="https://blog-dev.funkysi1701.com/images/2017/Screenshot_20170806-190053.png" loading="lazy"
width="1080" height="1920"
/&gt;
&lt;/p&gt;
&lt;p&gt;Before you rush and download the app I must warn you that it doesn’t do much yet. It displays some content that is on my website and there are a few links to allow sharing of content. I have some ideas to display content from my blog and allow sharing. I also have some other ideas for apps that might actually be useful to people that are not me. If you have ideas or feature requests do let me know.&lt;/p&gt;
&lt;p&gt;Ok how did I go about creating this app and getting it in the app store?&lt;/p&gt;
&lt;p&gt;Xamarin is now part of Visual Studio so step one is install all the Xamarin features to Visual Studio and build an app.&lt;/p&gt;
&lt;p&gt;Next I wanted to monitor my app. Now I know Application Insights doesn’t support apps so what tools are out there? HockeyApp is something I had heard of but they are in the process of being replaced with &lt;code&gt;https://appcenter.ms/apps&lt;/code&gt;. (Edit: Visual Studio App Center was retired on March 31, 2025)&lt;/p&gt;
&lt;p&gt;It was relatively easy to hook up my app to Visual Studio Mobile Centre. First install the required nuget packages. Then add using statements and the following line to your MainActivity.cs file (these instructions are available on the Mobile Centre)&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;using&lt;/span&gt; Microsoft.Azure.Mobile;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;using&lt;/span&gt; Microsoft.Azure.Mobile.Analytics;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;using&lt;/span&gt; Microsoft.Azure.Mobile.Crashes;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;using&lt;/span&gt; Microsoft.Azure.Mobile.Distribute;
&lt;/span&gt;&lt;/span&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;using&lt;/span&gt; Microsoft.Azure.Mobile.Push;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-csharp" data-lang="csharp"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;MobileCenter.Start(&lt;span style="color:#e6db74"&gt;&amp;#34;[Unique ID]&amp;#34;&lt;/span&gt;,&lt;span style="color:#66d9ef"&gt;typeof&lt;/span&gt;(Analytics), &lt;span style="color:#66d9ef"&gt;typeof&lt;/span&gt;(Crashes), &lt;span style="color:#66d9ef"&gt;typeof&lt;/span&gt;(Distribute), &lt;span style="color:#66d9ef"&gt;typeof&lt;/span&gt;(Push));
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Now you can connect the Mobile Centre to your source code (VSTS in my case) and get it to run a build for every commit.&lt;/p&gt;
&lt;p&gt;One complexity of the build is that you need to supply a keystore file (basically a certificate to digitally sign your app). I found the best way to do this was to use Visual Studio to create the file.&lt;/p&gt;
&lt;p&gt;In VS2017 there is a option called Archive Manager under the tools menu. In here click the distribute button and select Ad-hoc. In the signing identity section you can create a keystore file. Enter a few details and a keystore file will be created in AppData\Local\Xamarin\Mono for Android\Keystore[keystore name][keystore name.keystore]&lt;/p&gt;
&lt;p&gt;Once you have added the keystore file to your build you can enable the distribute option. Now you will get an email after every build with a link to install your app.&lt;/p&gt;
&lt;p&gt;Every time your app crashes the details will be logged in the crashes section for you to explore and fix the issues.&lt;/p&gt;
&lt;p&gt;The Analytics section allows you to explore how your app is being used. You can also add Analytics.TrackEvent(&amp;ldquo;Feature X&amp;rdquo;) to measure the usage of different features.&lt;/p&gt;
&lt;p&gt;There are more things you can do which I will explore more at another time along with how to get your app into the Google Play Store.&lt;/p&gt;</description></item></channel></rss>