<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Step Up Labs - Medium]]></title>
        <description><![CDATA[Company blog of Step Up Labs, developers of Settle Up. - Medium]]></description>
        <link>https://medium.com/step-up-labs?source=rss----e1f308ab7aa8---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Step Up Labs - Medium</title>
            <link>https://medium.com/step-up-labs?source=rss----e1f308ab7aa8---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 22:54:32 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/step-up-labs" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Summary of 2025 changes in monetization of Settle Up & results]]></title>
            <link>https://medium.com/step-up-labs/summary-of-2025-changes-in-monetization-of-settle-up-results-7ad316d559c7?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/7ad316d559c7</guid>
            <category><![CDATA[settle-up]]></category>
            <category><![CDATA[monetization]]></category>
            <category><![CDATA[mobile-apps]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[business]]></category>
            <dc:creator><![CDATA[David Vávra]]></dc:creator>
            <pubDate>Mon, 15 Dec 2025 20:18:04 GMT</pubDate>
            <atom:updated>2025-12-15T20:18:03.658Z</atom:updated>
            <content:encoded><![CDATA[<p>2025 was a big year for <a href="https://settleup.io/">Settle Up</a>. After many years as a side project, we jumped in on it full-time. We hired <a href="https://www.linkedin.com/in/janotisk/">Jan Otisk</a>, a UX designer, and introduced many changes in monetization. There are so many communities and conferences about technologies, but this topic is very quiet, especially in Czechia. While being one of the main factors behind the success of mobile apps! I want to share what we did this year and what the results are. I hope it will help other mobile app developers and spark some discussion and knowledge sharing.</p><p>I gave a talk about this at my alma mater, <a href="https://fel.cvut.cz/en">FEL ČVUT</a>, in November. I talked about Settle Up’s story, because it started as a project for my diploma thesis at the University. <a href="https://www.youtube.com/watch?v=9fuFqSft7ec">Here is the recording</a> (in Czech). In this post, I will share even more details.</p><p><strong>1. Trials</strong></p><p>We introduced a 7-day trial option for yearly Premium subscription. Along with that, we implemented a bottom sheet which is shown every time the user tries to use a specific Premium feature. The trial can be started directly on the bottom sheet, while previously the user had to go to a separate Premium screen for purchase. This way, we promote a Premium feature in the context of what the user is trying to do in the app.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GKmZ88zqGiv4au_uAktY-Q.png" /><figcaption>Redesign of Premium bottom sheets with free trial</figcaption></figure><p>This proved a great success: we had 5 times more purchases than last year. Although not everybody converts to paid subscription after the trial (the conversion rate has been about 35%), it resulted in 1.8× revenue on Android and 1.9× revenue on iOS.</p><p><strong>2. Group Premium for holidays</strong></p><p>Some users don’t want to pay a renewing subscription and prefer a one-time purchase. For those, there is the Group Premium: a product which you can split as an expense among the group members. But since it was a lifetime product, it was quite expensive. We got some feedback about the price, so we introduced much cheaper time-limited options. It’s targeted at vacation goers and travelers: you can get Group Premium just for 2 weeks and split the cost with your friends. We even considered removing the lifetime option completely. Lifetime products are a good short-term revenue boost, but bad for long-term support of those users. In the end, we decided to make the lifetime option more expensive.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7a_BLm2ZdSs3NTtoRz4Iqg.png" /><figcaption>Redesign of Group Premium with new time-limited options</figcaption></figure><p>This wasn’t the success we expected. It resulted in only 1.2× number of purchases, but just half the revenue. The problem might have been that the implementation took us longer than expected and we only launched in the middle of August — at a time when summer holidays were over for most people. We will try to properly support it with a campaign at the beginning of the next holiday season and see.</p><p><strong>3. Before ad screen</strong></p><p>The free version of Settle Up is supported by advertising. A fullscreen ad is displayed after every 3rd expense added. To save the user from unexpected surprises, we show a screen before the ad which lets the user choose between viewing the ad or opening the Premium screen. This screen had a static image and users learned to ignore it. We realized it’s a wasted opportunity; this is a great place to promote Premium features. The design is inspired by Instagram Stories: it’s a carousel with Premium features shuffled differently each time. And users can purchase the Premium directly from this screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DcLnKcjmqZziGXxCszq-tg.png" /><figcaption>Redesign of before ad screen</figcaption></figure><p>The redesign worked. We have seen over 1.9× revenue from purchases coming from this screen. It’s interesting to see that purchases come more often from dark mode on Android and more often from light mode on iOS.</p><p><strong>4. Black Friday</strong></p><p>We usually run only one campaign per year — on Black Friday. Why then? It’s because the users expected it: some even messaged us asking for a Black Friday discount. Previously, we only sent them a notification, but the purchase screen didn’t show any significant changes. This year, we created a system for changing the purchase screen dynamically. We can control the colors remotely, the discount is clearly labelled and there is a countdown until the end of the promotion.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*c_46_YV4W_sL65wBYyDY3A.png" /><figcaption>Redesign of Black Friday promotion</figcaption></figure><p>Black Friday earned about 1.4× more in 2025 than in 2024. The new offers helped, but perhaps people are overwhelmed with so many Black Friday promotions from other companies. Next time, we will pick a time less busy with competing promotions and more relevant for our target customers. We will also increase the frequency of the campaigns, but we are mindful not to annoy customers with it.</p><p><strong>2025 summary</strong></p><p>At summer peak, we had 1M monthly active users. Our gross revenue for 01–11/2025 was around 1.3× more than during the same period in 2024. We are a team of 5 people, with 2 of us working full-time. We learned a lot, tried new things, some worked great, some less so.</p><p>In 2026, we plan to double the revenue so all of us can work full-time on our favorite project. We plan to redesign all screens in the app with an entry point to a possible Premium purchase like login, onboarding etc. We also plan to achieve feature parity between Android, iOS and the web app. Wish us luck and if you are willing to share the monetization journey of your app, we are happy to talk!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ad316d559c7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/summary-of-2025-changes-in-monetization-of-settle-up-results-7ad316d559c7">Summary of 2025 changes in monetization of Settle Up &amp; results</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Pay via bank app is now open-source]]></title>
            <link>https://medium.com/step-up-labs/pay-via-bank-app-is-now-open-source-5a89c82cb3cc?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/5a89c82cb3cc</guid>
            <category><![CDATA[kotlin-multiplatform]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[qr-code]]></category>
            <category><![CDATA[banking]]></category>
            <category><![CDATA[payments]]></category>
            <dc:creator><![CDATA[David Vávra]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 19:43:51 GMT</pubDate>
            <atom:updated>2025-01-08T19:43:51.599Z</atom:updated>
            <content:encoded><![CDATA[<p>We have a new feature in <a href="https://settleup.io/">Settle Up</a>: you can pay your debts directly via a bank app installed in your phone. It currently works only for Czech banks. We want to make mobile payments easier and cheaper for everyone, so that’s why we are open-sourcing the solution. Read more about the story behind it and how it works.</p><p>I was shopping on <a href="https://www.alza.cz/">Alza.cz</a> and wanted to pay the order within their Android app. I noticed a new button called “Pay via bank app”. And it had my bank app icon on it. I got curious, clicked on it, confirmed a dialog from my bank app and the order was paid! It was even easier than paying by card or Google Pay. And I imagine that Alza can save on fees to card companies. I thought: we need this in Settle Up!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*COAQs4j_WZn16y97SPg0Kg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*iKjZkL7g0UzlzFZ_2Jd5Qw.png" /><figcaption>Pay via bank app in Alza.cz Android app</figcaption></figure><p>I contacted <a href="https://cz.linkedin.com/in/michal-havryluk-2691a76">Michal Havryluk</a> who works on Alza mobile apps. He arranged that they allowed us to use their code on the one condition that we open-source it. We have been testing it in Settle Up for a month and now we are honouring the deal. Are you an e-commerce app wanting to save on card fees while bringing convenience to your users? Use our new <a href="https://github.com/step-up-labs/pay-via-bank-app">Pay via bank app</a> library.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*LUNy9l6TGh2ruK1oH6m1ZA.png" /><figcaption>Pay via bank app in Settle Up Android app</figcaption></figure><p><em>Pay via bank app</em> is a modern Kotlin Multiplatform library. It supports Android and iOS. Under the hood, it relies on bank app support for <a href="https://cs.wikipedia.org/wiki/Short_Payment_Descriptor">Short payment descriptor format (SPAYD)</a>. This format is what drives QR payments in the Czech Republic. It sounds simple, but each bank app accepts the SPAYD payload in a slightly different way. This library wraps it so that you don’t have to care about these implementation details.</p><p>Some Android bank apps allow for passing SPAYD payload directly via <em>Intent</em>. Others only accept QR code images, so we generate the QR code under the hood. On iOS, only QR codes are allowed. If only one bank app is installed in the user&#39;s phone, it opens directly and the user never sees the QR code. If there are multiple bank apps installed, the user will see a system dialog in which they can select their preferred bank app.</p><p>We like single-purpose libraries, so we didn’t include SPAYD generation in the library. You might already be using some other solution for QR payments in your app. But we were not happy with the old libraries for <a href="https://github.com/spayd/spayd-java">Java</a> and <a href="https://github.com/spayd/spayd-sdk-ios">Objective C</a>, so we created a new modern Kotlin Multiplatform library: <a href="https://github.com/step-up-labs/spayd-kmp">spayd-kmp</a>. Feel free to use it, although it is not required.</p><p>If you are a Czech company who needs payments in your mobile app, feel free to <a href="https://github.com/step-up-labs/pay-via-bank-app/blob/main/README.md">integrate the library</a>. We are open to discussion about improvements in <a href="https://github.com/step-up-labs/pay-via-bank-app/pulls">GitHub pull requests or issues</a>. In the future, we would also like to support other countries and open payment formats, such as the <a href="https://en.wikipedia.org/wiki/EPC_QR_code">EPC code</a>, which is popular in German-speaking countries.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5a89c82cb3cc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/pay-via-bank-app-is-now-open-source-5a89c82cb3cc">Pay via bank app is now open-source</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[FirebaseUI for .NET (WPF + UWP + Xamarin)]]></title>
            <link>https://medium.com/step-up-labs/firebaseui-for-net-wpf-uwp-xamarin-553abc5da3f?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/553abc5da3f</guid>
            <category><![CDATA[firebaseauthentication]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[wpf]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[csharp]]></category>
            <dc:creator><![CDATA[Tomáš Bezouška]]></dc:creator>
            <pubDate>Fri, 17 Jan 2020 18:56:43 GMT</pubDate>
            <atom:updated>2020-01-17T19:00:29.490Z</atom:updated>
            <content:encoded><![CDATA[<h3>FirebaseUI for .NET (WPF + UWP + Xamarin)</h3><p>Some time ago I wrote a post about <a href="https://medium.com/step-up-labs/firebase-authentication-c-library-8e5e1c30acc2">Firebase Authentication C# library</a> which allows developers add support for Firebase sign-in in their C# based applications. The library has since been downloaded more than 100k times from <a href="https://www.nuget.org/packages/FirebaseAuthentication.net">nuget</a> which is pretty wild. We use it internally in our UWP version of <a href="http://settleup.io/">Settle Up</a> — app for managing group expenses — and it works just fine.</p><p>One thing that is somewhat annoying though is the fact that C# developers are still required to do a lot of work that their fellow Android/iOS/Web colleagues don’t have to. In C#, you need to manually sign in with Facebook/Google/etc., get the access token and then sign in with Firebase (sure, there are other libraries to do that, but it’s still extra work). For signing in with Email &amp; Password it’s even worse: you need to create the whole UI flow yourself (sign in / sign up / forgotten password / etc.). On other platforms, developers can use <a href="https://firebase.google.com/docs/auth/">FirebaseUI</a> which takes care of everything. Wouldn’t it be cool if C# developers also had such a library? So I <a href="https://github.com/step-up-labs/firebase-authentication-dotnet">wrote it</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Op60Hqg88R90c5JvjJvOdQ.png" /><figcaption>FirebaseUI for WPF</figcaption></figure><h3>Platform support</h3><p>The situation in the .NET ecosystem is not as simple as it is on other platforms — you cannot simply have a single UI library because there are multiple UI frameworks. That’s why the C# implementation actually comprises 4 libraries:</p><ul><li>FirebaseAuthentication.<strong>net</strong></li><li>FirebaseAuthentication.<strong>WPF</strong></li><li>FirebaseAuthentication.<strong>UWP </strong>(not finished)</li><li>FirebaseAuthentication.<strong>Xamarin </strong>(not finished)</li></ul><p>FirebaseAuthentication.<strong>net </strong>is the original, platform independent (.NET Standard 2.0) authentication library, rewritten from scratch. Its new API is now more in line with the official <a href="https://firebase.google.com/docs/reference/js">JavaScript SDK</a>, which I drew inspiration from, and allows the UI libraries to be built on top of it.</p><p>The other libraries are framework-specific, as can be told by the suffix in their names. The only one that currently exists is for WPF <a href="https://github.com/dotnet/wpf">targeting .NET Core 3.1</a>. Other platforms (UWP and Xamarin) are currently on the roadmap.</p><h3>FirebaseAuthentication.net</h3><p>Enough talk, let’s see some code. First, let’s look at the new base library in action, which can be used in any framework which supports <a href="https://github.com/dotnet/standard/blob/master/docs/versions.md">.NET Standard 2.0</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e7a9c5d39e965a2a72eed782566b15dc/href">https://medium.com/media/e7a9c5d39e965a2a72eed782566b15dc/href</a></iframe><p>Configuration of the FirebaseAuthClient is pretty straightforward, you specify your API Key, Auth Domain (both can be found in <a href="http://console.firebase.google.com/">Firebase Console</a>) and your desired auth providers. Also, notice the UserRepository which specifies where to persist the user’s credentials. By default, the library uses in-memory repository, so to preserve user’s credentials between runs, use FileUserRepository.</p><p>After you have your client, you can sign in or sign up the user with any of the configured providers.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c6368595fc9ea161a2237f233ccd616f/href">https://medium.com/media/c6368595fc9ea161a2237f233ccd616f/href</a></iframe><p>As you can see, the sign-in methods give you a UserCredential object, which contains (among other things) a User object, which holds details about a user as well as some useful methods. For example, use GetIdTokenAsync() to get a valid <strong>IdToken</strong> you can use as an access token to other Firebase API (e.g. <a href="https://medium.com/step-up-labs/firebase-c-library-5c342989ad18">Realtime Database</a>).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1fa639582b8946b5020d8f49019a6fa/href">https://medium.com/media/c1fa639582b8946b5020d8f49019a6fa/href</a></iframe><h3>FirebaseUI</h3><p>The platform-specific UI libraries use the FirebaseAuthClient under the hood, but need to be initilized via the static Initialize method of FirebaseUI.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3955389386faba3265b2c6831d2bd389/href">https://medium.com/media/3955389386faba3265b2c6831d2bd389/href</a></iframe><p>FirebaseUI comes with FirebaseUIControl which installs into your Visual Studio toolbox and can be used in your xaml as follows (WPF):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/996e6e38ce6890b9ac04eaada2ea75f4/href">https://medium.com/media/996e6e38ce6890b9ac04eaada2ea75f4/href</a></iframe><p>This gives you the design-time preview below. Note that the designer will always show only these three providers, but when you run your app it will correctly show those you configure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MJvRbLiBL2Rxur9kP9eIRg.png" /><figcaption>FirebaseUIControl in Visual Studio</figcaption></figure><p>Toggling the visibility of this UI control is up to you, depending on your UI framework (WPF/UWP/Xamarin) and your business logic. For example, you could show it as a popup or a <em>Page</em> inside a <em>Frame</em> etc. <br>In general, though, you will typically want to toggle the control’s visibility in response to the AuthStateChanged event:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c222a77b4a52f9d0618e32a349f56f2/href">https://medium.com/media/6c222a77b4a52f9d0618e32a349f56f2/href</a></iframe><h4>Sign in with third party identity providers</h4><p>Currently, the library supports signing in with Apple, Google, Facebook, Twitter, Github and Microsoft identity providers. The UI library shows a dialog with an embedded WebView where the user signs in.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*5imJn4z8gqZrOXQS2RGBnQ.png" /><figcaption>Sign in via Microsoft</figcaption></figure><h4>Email and password sign in</h4><p>While the other auth providers simply open a dialog with an embedded WebView, email and password is a somewhat special case which needs an entire UI flow to be built around it. The library has 4 screens for sign in, sign up and password recovery.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*a-unpeYDvz-xVP5cmBwPgA.png" /><figcaption>Email &amp; password provider</figcaption></figure><p><strong>Localization</strong></p><p>Since the Android FirebaseUI is <a href="https://github.com/firebase/FirebaseUI-Android">open-source</a> I was able to pull their localized string resources and transform them into .NET resource files with powershell (something I <a href="https://medium.com/step-up-labs/localizing-uwp-apps-with-android-resources-e15ef92ae789">already blogged about</a>). Therefore, the library supports almost 40 languages out of the box. It automatically uses the appropriate one based on the values of DefaultThreadCurrentCulture<em> </em>and DefaultThreadCurrentUICulture<em>. </em>You can manually change the language as follows:</p><pre>CultureInfo.DefaultThreadCurrentCulture = new CultureInfo(&quot;cs&quot;);<br>CultureInfo.DefaultThreadCurrentUICulture = new CultureInfo(&quot;cs&quot;);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jecSMd-Wvy3Z9ITvchPUFQ.png" /><figcaption>FirebaseUI localization</figcaption></figure><h3>What’s next?</h3><p>The library is still under active development. It is open-source, hosted on <a href="https://github.com/step-up-labs/firebase-authentication-dotnet/tree/feature/v4">github</a>. As mentioned previously, FirebaseUI is currently only available for <strong>WPF</strong> on .NET Core 3.1, but UWP and Xamarin are on the roadmap.</p><p>Currently, you can install <em>v4.0.0-alpha.1</em> from <a href="https://www.nuget.org/packages/FirebaseAuthentication.wpf/absoluteLatest">nuget</a>. If you’re interested in nightly builds, see <a href="https://github.com/step-up-labs/firebase-authentication-dotnet/tree/feature/v4#installation">github</a> for more details.</p><pre># base package<br>dotnet add package FirebaseAuthentication.net -v 4.0.0-alpha.1<br><br># Platform specific FirebaseUI (has dependency on base package)<br>dotnet add package FirebaseAuthentication.WPF -v 4.0.0-alpha.1</pre><p>Sample projects are also available on <a href="https://github.com/step-up-labs/firebase-authentication-dotnet/tree/feature/v4/samples">github</a>. Feel free to clone the whole repo and try them out.</p><p>If you have any issue, comments or feature requests, please raise them in this <a href="https://github.com/step-up-labs/firebase-authentication-dotnet/issues/100">github issue</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=553abc5da3f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/firebaseui-for-net-wpf-uwp-xamarin-553abc5da3f">FirebaseUI for .NET (WPF + UWP + Xamarin)</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Completely redesigned Settle Up for iOS released]]></title>
            <link>https://medium.com/step-up-labs/completely-redesigned-settle-up-for-ios-released-658fc47418e5?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/658fc47418e5</guid>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[expense-management]]></category>
            <dc:creator><![CDATA[David Vávra]]></dc:creator>
            <pubDate>Wed, 01 May 2019 15:37:46 GMT</pubDate>
            <atom:updated>2019-05-01T15:50:24.774Z</atom:updated>
            <content:encoded><![CDATA[<p>We have been working hard on the new <a href="https://itunes.apple.com/us/app/settle-up-7/id737534985">Settle Up for iOS</a> and it’s finally here. It brings the long-awaited feature parity with Android and Windows versions. Now your friends with iPhones are not limited in using Settle Up.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*ndp_aZWC5K23_HVnFCNY4g.png" /></figure><h3>The app is free to download</h3><p>Up until now, Settle Up cost $1.99 on iOS, while the app on Android has always been free. We heard you loud and clear that friends on Android can use the app freely while iOS friends had to pay up front. This different monetization was due to historical reasons, but now it’s finally unified. Today, the app is free in the Basic plan and you can purchase the Premium plan with the following extra features:</p><ul><li>No ads</li><li>Adding receipt photos</li><li>Extra colors of groups</li></ul><p>We always honor your previous purchases. So, <strong>everyone who purchased the app already has no ads and receipt photos unlocked forever</strong>.</p><p>The new Premium is also shared across platforms: if you have multiple devices or you switch phones, you can have Premium on iOS, Android, and Windows and pay only once.</p><h3>Fast modern-looking app</h3><p>The app is completely redesigned. It shares design philosophy and brand with the Android app, but it still follows iOS design guidelines and best practices. The design maintains group circles on top as a quick way to figure out balances in the group and who should pay next. You can quickly swipe between groups. Each group can have a different color, so you immediately know which group you are in. The UI also features member avatars which are easier to scan through than reading names.</p><p>We changed not just design, but also the underlying sync technology — now you don’t need to refresh anything because the app refreshes automatically so it’s super fast. Try placing two phones next to each other and change something on one to see it in action! Moreover, the app continues to work offline.</p><h3>Feature-packed expenses</h3><p>Adding expenses is better than ever. You can finally enter an expense where <strong>multiple people paid</strong>. Don’t quickly know how much 5 beers are when one cost $2.45? Use the <strong>integrated calculator</strong>. Exchange rates now support many more use-cases: you can have a <strong>different exchange rate for each expense</strong> and exchange rates are <strong>synced with other members</strong>.<strong> </strong>Receipts were previously a local-only feature, now they sync with others as well (but it’s a Premium feature). And finally, you can enter not just expenses, but also <strong>incomes</strong> — like that refund of a deposit at your last trip.</p><h3>Easy group sharing via a link</h3><p>The old app had group sharing based on emails. It wasn’t very practical because these days you might not have your friends’ email addresses. You might just have the phone number, WhatsApp or iMessage connections. Now you can share groups via a link and share them with any app that you use for communication with your friends. The link automatically redirects to the app if installed or to App Store / Google Play / our website.</p><p>Plus, we have added an even simpler way for friends who are in the same room. One person can <strong>broadcast the group “nearby”</strong> and others can join it automagically. It uses ultrasound!</p><p>We even support some advanced permission management like read-only access or transferring group ownership.</p><h3>Other notable additions</h3><p>There are many tweaks here and there. You can:</p><ul><li>Create an account with email/password, not just with Google or Facebook</li><li>See the history of changes in a group. This way, you are in control of expenses others add or change.</li><li>Change group order</li></ul><h3>What did we remove?</h3><p>We removed a few things:</p><ul><li>Offline groups don’t sync so people were losing data in the past. We don’t want our users to have such bad experience so we decided not to allow offline groups. Once you create the group online, you can keep adding expenses offline.</li><li>Marking expenses as transfers. In the new version, we have a simplified workflow for transfers. Transfers are now always 1:1 transactions.</li><li>Transaction tolerance. It was confusing to explain what it means and it wasn’t used a lot.</li><li>Adding more emails you own. Now you can sign in with any of your accounts, and you can clearly see who has access to your group. With sharing via link you don’t even need to know your friends’ email addresses.</li></ul><h3>What’s next?</h3><p>There are still some features from Android and Windows that are not available in iOS. We plan to gradually add them:</p><ul><li>Localizations</li><li>Transaction categories</li><li>Recurring transactions</li><li>Group Premium plan</li><li>Charts and statistics</li></ul><p>Let us know what you think about the <a href="https://itunes.apple.com/us/app/settle-up-7/id737534985">new iOS app</a>. The best way is to write us at <a href="/service/mailto:ios@settleup.io">ios@settleup.io</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=658fc47418e5" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/completely-redesigned-settle-up-for-ios-released-658fc47418e5">Completely redesigned Settle Up for iOS released</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Charts: Exclusive in Settle Up for Windows]]></title>
            <link>https://medium.com/step-up-labs/charts-exclusive-in-settle-up-for-windows-bcf165f61c31?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/bcf165f61c31</guid>
            <category><![CDATA[iou]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[expense-management]]></category>
            <category><![CDATA[windows-10]]></category>
            <dc:creator><![CDATA[Tomáš Bezouška]]></dc:creator>
            <pubDate>Sun, 03 Mar 2019 21:55:47 GMT</pubDate>
            <atom:updated>2019-03-03T22:27:08.953Z</atom:updated>
            <content:encoded><![CDATA[<p>Settle Up is an app for everybody who needs to track shared expenses. It’s perfect for travelers, flatmates and friends who don’t want to argue over who should pay next or who owes whom. The app always shows what the current balances are and how to settle the debts. It is available for<a href="https://play.google.com/store/apps/details?id=cz.destil.settleup"> Android</a>,<a href="https://itunes.apple.com/us/app/settle-up-7/id737534985"> iOS</a> (redesigned version in beta), web and <a href="https://www.microsoft.com/store/apps/9NBLGGH07ZGT">Windows</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*USNMnk_Lb7lz4eGjvIRRaw.png" /><figcaption>iOS | Windows | Android</figcaption></figure><p>In this post, I would like to summarize some of the features which are new or somewhat unique to the Windows version of the app.</p><h3>Better overview with charts</h3><p>Charts are the newest and most unique addition to the Windows app. They give you a great summary about how much you spent in total or in a given period. They work best if you set a category for each transaction. This then gives you a nice overview about how much your group spent on each category.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/949/1*kb1Ypu00DWMUPteQz5yr-A.png" /><figcaption>Charts</figcaption></figure><p>At the moment there are three charts:</p><ul><li>Bar chart showing breakdown by period (typically per month)</li><li>Pie chart showing amounts spent by category</li><li>Pie chart showing amounts spent by each member</li></ul><h3>More space</h3><p>One case when the Windows app really shines is the use of the screen real estate. Compared to smartphones, devices with Windows generally have larger screens so the users expect the app to take advantage of the extra space. A great example of how the Windows version of Settle Up uses screen space is the transaction dialog. When there is enough room, adding an expense can be done on a single screen — it’s as simple as entering the amount and hitting save.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/948/1*ZL8T3l7okiPz-qkyZc52uA.png" /><figcaption>New expense on a large screen</figcaption></figure><p>Advanced scenarios are covered by the app as well. You can</p><ul><li>Split the expenses by amounts or weights</li><li>Have multiple people pay</li><li>Enter transfers (when you give money to someone) and incomes (when you receive money back, e.g. from a hotel)</li><li>Enter expenses in any world currency and have the exchange rate set automatically (but you can set a custom one)</li><li>Add receipt photos</li><li>Set categories</li></ul><h3>Cortana tells you who should pay next</h3><p>Settle Up now works with three voice assistents — Alexa, Google Assistant, and Cortana. All you need to say is “Ask Settle Up who should pay” and the assistant will tell you out loud who should pay next. If you have multiple groups the last one you opened in the app will be used, or you can specify its name in your question, e.g. “Ask Settle Up who should pay in ‘Skiing’”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n5bZfqWX-r2ZDxD5rKEf5g.png" /><figcaption>Cortana | Alexa | Google Assistant</figcaption></figure><h3>Finishing a group</h3><p>After you are finished with your group (e.g. when you come back from your trip) you can do several things:</p><ul><li>Delete or leave the group</li><li>Archive it, which still lets you preview it anytime later</li><li>Start a similar group (this copies the same members and permissions into a new group)</li><li>Export all your data as txt and csv files for further analysis (e.g. in Excel)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/347/1*TYTRdO4NxMh6THq0QZCsWg.png" /><figcaption>Start a similar group</figcaption></figure><h3>Let us know your thoughts</h3><p>If you like the app, please share the love on <a href="https://www.microsoft.com/en-us/p/settle-up/9nblggh07zgt">Microsoft Store</a>.</p><p>Something not right? Missing any features? Let us know here in the comments or contact us at <a href="/service/mailto:windows@settleup.io">windows@settleup.io</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bcf165f61c31" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/charts-exclusive-in-settle-up-for-windows-bcf165f61c31">Charts: Exclusive in Settle Up for Windows</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Localizing UWP apps with Android resources]]></title>
            <link>https://medium.com/step-up-labs/localizing-uwp-apps-with-android-resources-e15ef92ae789?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/e15ef92ae789</guid>
            <category><![CDATA[android-app-development]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[localization]]></category>
            <dc:creator><![CDATA[Tomáš Bezouška]]></dc:creator>
            <pubDate>Mon, 17 Sep 2018 13:46:46 GMT</pubDate>
            <atom:updated>2018-09-17T13:46:46.426Z</atom:updated>
            <content:encoded><![CDATA[<p>Recently, we <em>finally </em><a href="https://www.microsoft.com/store/apps/9NBLGGH07ZGT">released</a> the Windows 10 version of <a href="http://settleup.io/">Settle Up</a> — app for managing group expenses. The app is now available for Android, iOS, Windows 10 and web. Since we want to reach as many users as possible, we localized everything we could — the app itself, screenshots, store descriptions, etc. The easiest way to localize your app into many languages is to crowdsource the process — we use <a href="http://getlocalization.com/">getlocalization.com</a> where people who want to use the app in their language help us out by translating the English phrases we provide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*n3EzggrmD83rtyzFuHAIzg.png" /><figcaption>Store listing of Settle Up in Spanish</figcaption></figure><p>All our localization resources are divided into several files. They contain the store descriptions, sample data for screenshots and of course resources for the app itself. As the Android version was developed first, the resources are kept in the <a href="https://developer.android.com/guide/topics/resources/string-resource">Android <em>strings.xml</em></a> format. This isn’t supported by the UWP platform, which requires the resw/resx format.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbb55d508e5d07f55437ab4b0232bb48/href">https://medium.com/media/cbb55d508e5d07f55437ab4b0232bb48/href</a></iframe><p>Another thing is taking screenshots. Microsoft Store requires you to provide localized screenshots for each language your app supports, otherwise you risk not passing the app certification process. For us, this means creating a sample group, filling it with localized data and taking several screenshots of the app. Repeat for more than 15 languages. You can imagine that this can get very tedious.</p><p>In this blog post, I would like to show you how we convert the Android strings.xml files into Windows resx format so they are usable in UWP. In the second part of this post, I will show you the process of taking screenshots of the app in several languages. All scripts are in powershell, but there is nothing too complex about them so you should follow easily even if you have never used powershell before.</p><h4>Using resx resources in a UWP app</h4><p>There are several ways to localize your UWP app. The offical <a href="https://docs.microsoft.com/en-us/windows/uwp/app-resources/localize-strings-ui-manifest#create-a-resources-file-resw-and-put-your-strings-in-it">Microsoft docs </a>suggest using <strong>resw</strong> resource files and then decorating your xaml controls with x:Uid markup. I don’t like this approach one bit because it gives you zero design-time, compile-time and intellisense support.</p><p>Instead, I prefer to use <strong>AppResources.resx </strong>with a combination of a strongly-typed ‘<em>designer</em>’ class which can be used both in code and in xaml bindings. See example of both:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/97d7783488dba44007c8e94fd83f95ba/href">https://medium.com/media/97d7783488dba44007c8e94fd83f95ba/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/602ee0fb44e733011df914177f749d76/href">https://medium.com/media/602ee0fb44e733011df914177f749d76/href</a></iframe><p>As you can see, the AppResourcesclass is a simple strongly-typed wrapper around ResourceManager. This approach gives you design-time and intellisense support as well as compile-time checks when you access the class in code-behind.</p><p>The way I decided to structure the app is to have all the localization resources in a separate project (~assembly) and reference it from other projects. This way you can also reference it from your background services or other places you might need them. The language resource files are named “AppResources.{language}.resx” (language being “de”, “cs-CZ” etc). The default resource (English in our case) is simply called “AppResources.resx”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/518/1*vvkb6NX9b9x4kx6H_xNpyg.png" /></figure><p>There is one more thing— the UWP package generator (which turns your project into <em>appx </em>/ <em>appxbundle</em> / <em>appxupload</em> files) needs to know which languages your app supports. It does so by looking for specific files in your main project — <em>/Strings/{language}/Resources.resw. </em>These files need to contain at least one (even dummy) phrase for the package generator to mark that your app supports this language. Since our resources live in different assembly under different name, they won’t be picked up by the package generator. You need to create those dummy <em>resw</em> files manually (or via a script of course). But this needs to be done only once so then you don’t need to touch those dummy resw files anymore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/453/1*JXs2q4_NZmxib0BJ3CpHyg.png" /></figure><p>That’s the theory, now let&#39;s see how we can generate everything we need from Android strings.</p><h4>Downloading resources from getlocalization.com</h4><p>The first thing you need to do is to get the Android strings.xml files from somewhere. As I mentioned, we use getlocalization.com. We certainly don’t want to manually download all files each time a phrase is added, fortunately, they offer API anyone can use to get their localized files.</p><p>See sample code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbdb30cf084f3714d4a22b6b903c464f/href">https://medium.com/media/cbdb30cf084f3714d4a22b6b903c464f/href</a></iframe><p>As you can see, downloading the localized files is pretty simple, you just need to <a href="https://www.blitter.se/utils/basic-authentication-header-generator/">base64-encode</a> your credentials you normally use to log in and set them as your Authorization header.</p><p>The only file I couldn’t download with their API is the original English (default) one, I still have to download that manually. If you know how to download it via API, let me know in the comments.</p><h4>Transforming strings.xml to AppResources.resx</h4><p>The next step is to generate the AppResources.resx along with a corresponding c# ‘designer’ file for strong types. Visual studio actually has a built-in generator (<em>PublicResXFileCodeGenerator</em>) but it’s missing a few features I wanted to use. One such thing is support for plural forms — you want to be able to correctly localize “1 orange”, “2 oranges” and “many oranges” (in some languages, like Czech, the plural form for “a few” and “many” differs). Android strings.xml support this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/100ae1a121fcacab2f1d64ffa8d91ee3/href">https://medium.com/media/100ae1a121fcacab2f1d64ffa8d91ee3/href</a></iframe><p>This is used like this (Kotlin snippet):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/64fc6f62dd7aa3a9422883fdb367fed6/href">https://medium.com/media/64fc6f62dd7aa3a9422883fdb367fed6/href</a></iframe><p>As far as I know, this isn’t natively supported in UWP, but it turns out that adding some basic support for plural forms is not that difficult:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/498ea980fb9307f62c09d57fc2a7f425/href">https://medium.com/media/498ea980fb9307f62c09d57fc2a7f425/href</a></iframe><p>The main logic is in the “<em>WithCount</em>” method. As you can see, it is very basic and could probably be extended to be more granular and better suit other languages, but so far, it suffices.</p><p>Ok, enough theory, let&#39;s take a look at the powershell generator.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2aec2c375369ac6422cbeceac79b7653/href">https://medium.com/media/2aec2c375369ac6422cbeceac79b7653/href</a></iframe><p>As you can see, it&#39;s no rocket science. The Convert-Everything function first generates the designer file from the default resource. This is done by iterating over the <em>/resources/string</em> and <em>/resources/plural</em>s nodes of the supplied XML file. The functions <em>Write-DesignerHeader</em> and <em>Footer</em> are static and not so interesting. You can find them <a href="https://gist.github.com/bezysoftware/a0b56f125c7df34dbac7e9263fd11c20">here</a>.</p><p>Next, let&#39;s take a look at the Convert-StringsToResX function. Its job is to convert the <em>strings.xml</em> file into <em>AppResouces.resx</em>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6de5ccf818bafb287aad86133b144a1c/href">https://medium.com/media/6de5ccf818bafb287aad86133b144a1c/href</a></iframe><p>Again, it&#39;s not too difficult because the code is similar to the one generating the designer file. The main pain-point was converting all phrases correctly into valid XML values. This turned out to be pretty complex because there are many things to handle, as you can see. It’s not just special characters, but also string interpolation symbols, which are different in Java and C# (%s vs {0}). Also, the source strings were inconsistent in using the CDATA container, so I decided to use it to wrap all phrases for consistency. Just like before, the Header and Footer functions are not so interesting, you can find them <a href="https://gist.github.com/bezysoftware/d883fe7751b45fe5e79ccd3f790d7c45">here</a>.</p><p>And that’s it, you have all you need to localize your UWP app. In reality, we actually have another file with Windows-only phrases, and the script just simply merges it with the main resource file. For the sake of brevity (the post is already pretty long), this isn’t included in the examples, but you get the idea.</p><h3>Automating screenshots</h3><p>The next step is taking screenshots of your app in all the languages it supports. It might seem as too much work for something that is done once and takes only a few minutes, but believe me, you will be thankful for having this process automated for each new language / feature / redesign / typo fix.</p><p>To make the screenshots, I found it easiest to use the CodedUI tests project in Visual Studio. There is a pretty good tutorial about them on <a href="https://docs.microsoft.com/en-us/visualstudio/test/test-windows-store-8-1-apps-with-coded-ui-tests?view=vs-2015">Microsoft Docs</a> so check that out first.</p><p>In short, you run the Coded UI Test Builder and then click through different parts of your app. As you go, you “save” various controls in the app into the builder, which at the end will generate code you can use to remotely manipulate those controls (click button ‘a’, set textbox’s text to ‘foo’ etc.). One thing to stress out is that if the controls you need don’t have an x:Name or AutomationProperties.AutomationId set, the builder will try to find them during runtime by some other property+value combination, which might fail (e.g. it tries to look for a <em>TextBlock</em> with value of <em>Text</em> set to “Login”, but during localization scenarios, this value will be different for all languages other than English). Therefore, always set the <em>Name </em>or <em>AutomationId</em> to make sure your code works.</p><p>Another thing to note is that CodedUI tests are supported only in VS Enterprise and only with MSTest (v1). With these limitations in mind, let&#39;s take a look at the code at a high level.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90c9ef3e39f528ec0f4cfc76ad7262d3/href">https://medium.com/media/90c9ef3e39f528ec0f4cfc76ad7262d3/href</a></iframe><p>The [TestMethod]attribute and corresponding method need to be used for each language because MSTest (v1) doesn’t support [Theory]and similar attributes you might know from in XUnit / NUnit / MSTest V2.</p><p>This UI test basically does 4 things —starts the app, logs in, takes the screenshots of different screens, logs out. Setting the current language of the app is done in the <em>LoginAsync</em> method:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d9cfc605c959190be783402b9743297d/href">https://medium.com/media/d9cfc605c959190be783402b9743297d/href</a></iframe><p>There are two not so obvious things going on here:</p><ul><li>You cannot pass a parameter to the app when it&#39;s starting. Therefore, you need to come up with a different way to set the app language to the one you want. I placed an invisible (opacity = 0) TextBox on the Login form with a <em>TextChanged</em> event handler which sets the language via <em>AppResources</em> instance. The TextBox is invisible to the user, but the Coded UI tests have a reference to it and can manipulate it.</li><li>Everything under <em>this.UIMap.UISettleUpWindow</em> was generated by the UI Test builder. Accessing those properties will do a lookup for the respective controls in the running app. If they are not found within the default timeout, exception will be thrown.</li><li>Login in the app is done under different accounts for each language. Each account has a localized group with localized expenses (e.g. “Skiing trip” makes sense for someone in Canada, but not so much for someone in Mexico).</li></ul><p>Going around the app is very similar to what is done in <em>LoginAsync</em> — basically just a combination of <em>Tapping</em> and Keyboard <em>SendKeys</em>. That leaves us just one final thing — taking the screenshots:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36a012dd9c6b1462f1a6fdc07bb20d5f/href">https://medium.com/media/36a012dd9c6b1462f1a6fdc07bb20d5f/href</a></iframe><p>Again, let me point out the not-so-obvious things:</p><ul><li>I couldn’t determine the DPI of my screen by <a href="https://www.codeproject.com/Questions/558094/howplustoplusgetplustheplussystemplusdpiplusplusse">any</a> <a href="https://stackoverflow.com/questions/13228185/how-to-configure-an-app-to-run-correctly-on-a-machine-with-a-high-dpi-setting-e/13228495#13228495">available</a> <a href="https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/dpi-related-apis-and-registry-settings">method</a> so I just decided to hard-code it. I will run the UI tests only from my laptop anyway.</li><li>The code assumes the app is running in maximized mode (screenshot is of the entire working area — excluding the task bar).</li></ul><p>And that’s it. The screenshots will be saved in <em>c:\screenshots\{lanugage} </em>where you can find them and use them in your submission to Microsoft Store.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e15ef92ae789" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/localizing-uwp-apps-with-android-resources-e15ef92ae789">Localizing UWP apps with Android resources</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What’s new in the new Settle Up for Android?]]></title>
            <link>https://medium.com/step-up-labs/whats-new-in-the-new-settle-up-for-android-ea53bfabd96f?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/ea53bfabd96f</guid>
            <category><![CDATA[expenses]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[settle-up]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[David Vávra]]></dc:creator>
            <pubDate>Tue, 10 Oct 2017 16:17:29 GMT</pubDate>
            <atom:updated>2017-10-10T16:17:28.683Z</atom:updated>
            <content:encoded><![CDATA[<p>We have been working hard for the past year to bring you the new Settle Up. We decided to redesign the app and change the underlying technology, so it’s rewritten from scratch. Let’s dive deep into most of the changes.</p><p><strong>New design and colors</strong></p><p>That is probably the most visible aspect, because we now have a new design from a professional designer Michal Feltl. It follows the Material Design Guidelines strictly and adds some playfulness. The main concept is that you should be able to choose a different color for each group. The whole app changes color based on which group you are in. We all love the old brown color, so if you want the app look similar to the previous version, just change the group color to it :) The app is also more vibrant and “yours” with pictures of the members. The most visible element is “group circles” — elegant visualizations of debts in the group. The more you owe, the bigger circle you have. We borrowed this from our iOS app to bring platforms closer together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dCX0f6YOg55oZnUbDCHnkQ.png" /></figure><p><strong>Super-charged new expenses</strong></p><p>Adding new expenses is the main activity in the app. Over the years, we have discovered that there are many use-cases for splitting costs, so it’s quite hard to design its UI right. We liked the simplicity of the previous design with one screen for everything, but after a lot of research we had to split it into multiple screens. The previous design wasn’t expandable for new features and many things were hidden. With the new design, we can support all these use-cases in a clean way:</p><ul><li>Multiple flows (now Expenses and Transfers, Incomes coming soon)</li><li>One person paid</li><li>Multiple people paid</li><li>Custom keyboard for amount with calculator</li><li>Simple split (with checkmarks for whom)</li><li>Split by weights</li><li>Split by amounts</li><li>Add individual amounts first</li><li>List of all supported currencies</li><li>Managing exchange rate</li><li>Adding receipt photo</li><li>Adding purpose</li><li>Changing date</li></ul><p><strong>Sharing group has never been easier</strong></p><p>Sharing via email in the old app is kind of old. Nowadays, people use various messengers and social networks much more than email. It’s common that you don’t have the email address of the people you are travelling with. Sharing group is very important for us — it’s how the app spreads to new users! So it has to be as simple as possible. The simplest solution is a link — you can share this link via any channel you like (WhatsApp, SMS, email, Facebook group etc.) Anyone who clicks the link is automatically forwarded to the App Store on iOS, the Play Store on Android and to our web app on other devices.</p><p>Plus we have added an even simpler way for friends who are in the same room. One person can broadcast the group “nearby” and others can join it automagically. It uses ultrasound!</p><p>And you can still add permissions manually via email on the Share group screen if the link doesn’t suit you.</p><p><strong>Currencies done right</strong></p><p>It’s quite common to use Settle Up in multiple currencies while travelling and expect to have the final debts in a single currency. It’s really important that everybody has the same exchange rates and that the debts are the same everywhere. Previously, it was a paid local-only feature and there was one exchange rate for the whole app. Now we made it available for everybody, the exchange rates are finally synchronized and can be different for each expense! This enables use-cases where you pay something with money from the exchange office and something with your card — both with a different exchange rate. Exchange rates are also updated daily so you always get the current exchange rate for that day. You can even use historic exchange rate if you change date of the expense. If you edit an exchange rate, it will stay fixed for future expenses and the automatic exchange rate won’t be applied (unless you choose to).</p><p><strong>Receipt photos are not hidden anymore</strong></p><p>It’s useful to attach receipt photos to your expenses. But this feature was quite hidden in the old app. It was a local-only feature and some users thought that it was actually a bug. Now it’s visible on the Summary screen and synchronized, of course. However, saving a lot of pictures costs us more on the server side, so we decided to make this feature Premium only.</p><p><strong>Permissions and sign in revamped</strong></p><p>Permissions were quite confusing in the old app and users often asked us for support regarding them. The main reason of this problem was merging permissions and group members. Members had two emails: one for sending data via email and one for access to the group. We decided to split it completely and make it clearer — group members are people participating in the expenses. They don’t have any email addresses. You can edit them in the Members screen. And permissions are the accounts which have access to the group which you can edit in the Share group screen. This separation allows for nice use-cases:</p><ul><li>Not every member needs access to the group or use the app at all. Others can manage their expenses.</li><li>People can have access to the group and view what’s going on, but they don’t have to be members.</li></ul><p>You can link these and say which member “is you” which will help you see your debts from the group on the Overview and a small visual hint near the member icon.</p><p>The level of permissions was quite basic in the old app. We made it more robust with these three levels:</p><ul><li>The group owner can do everything, can’t leave the group unless the ownership is transferred.</li><li>Edit transactions &amp; members — this type can do everything except deleting a group and removing permissions from others</li><li>Read-only access can only watch what’s going on, but can’t change expenses or members</li></ul><p>Sign in also has more options now. You can sign in with Google, Facebook or create an email/password account. And you can save all of this to the Smartlock for passwords for an even faster sign-in.</p><p><strong>Bullet-proof synchronization</strong></p><p>We know from user feedback that the old synchronization was not 100% reliable. In some very rare cases some expense weren’t synchronized which caused discrepancies in the debts. That was really bad for the user’s trust so we were looking for a more robust solution. We found a service called Firebase. Firebase is not only battle-tested on unstable mobile connections, but it’s also super-fast. If you add an expense on one phone, it appears on the other phone almost instantly. No more “Sync now” buttons! Firebase also works fully offline so don’t worry if you are in a foreign country without a data plan.</p><p>But since we also need to support the old apps, we had to make both systems work together seamlessly. It’s the main reason why the redesign took so long and the app was in beta for many months. But we believe we have nailed it now and have strong foundations to build on.</p><p>In order to support Firebase, we need to convert group data into a new format. This happens when you launch the updated app for the first time. We convert up to 5 groups which were used last. You can convert more of them in the My Groups screen. Don’t worry, you can still use the groups in the old versions and other platforms after the conversion.</p><p><strong>New monetization</strong></p><p>For historic reasons, our monetization has been quite fragmented. It’s a free app with ads and in-app purchases on Android, paid app with unlimited features on iOS and free web app but with limited features. It stops some users from using the app, because “it’s not fair that my friend on Android doesn’t have to pay”. Also, when you change your phone from iOS to Android, you have to pay again.</p><p>We understand it and want to unify the experience across platforms. We also have to pay server costs for all users so we need to monetize all users, not just new ones. We decided to switch to a Basic plan with ads and limited features and a Premium unlimited plan. The Premium plan can be purchased via subscriptions (monthly or yearly).</p><p>We are very careful not to annoy users and not to monetize aggressively. We believe that building user trust will benefit us more in the long term. The app should be usable very well in the Basic plan. The ads are shown AFTER you add every third expense. Your task is done and you might be actually interested in the ad. The Premium features are not essential for every day use and they are just something extra:</p><ul><li>Adding receipt photos</li><li>Extra colors for your groups</li><li>No ads</li></ul><p>Plus we are offering a free trial for the Premium plan: a month if you update from the old app and 14 days for new users, both with delayed opt-in. This means that you can start the trial whenever it fits you.</p><p>We are also grateful for your previous purchases in the old app:</p><ul><li>If you removed ads in the old app via an in-app purchase, you won’t see ads in the Basic plan.</li><li>Debts in single currency is now available for everyone.</li><li>We have introduced Search instead of the paid Filter feature. You can find it when you click SHOW ALL in the group.</li><li>If you helped us in the past and had all extras unlocked for free, we give you a year of the Premium plan.</li></ul><p><strong>Other smaller new features</strong></p><ul><li>Overview of your debts across your groups</li><li>A more detailed list of changes in all your groups</li><li>Richer notifications</li><li>CSV export directly in the app when you use the Email export. No need to use the web app for that.</li><li>List of all transactions grouped by the month including total spent value for each month</li><li>You can change the order of your groups in My groups</li><li>Sign out</li><li>Statistics about the app on the About screen</li></ul><p><strong>What did we remove?</strong></p><p>Redesign doesn’t mean only new features, but also some spring cleaning. We had some features which were rarely used, confusing, or too geeky for a regular user. We have simplified the app by removing them. These are:</p><ul><li>“Dlužníček” in the Czech language — we all love that familiar name, but it’s quite hard to do branding if you have a different app name in a different country. For example, our Facebook page was then weirdly named “Settle Up (Dlužníček)”. We decided to use “Settle Up” in all languages and build a strong brand.</li><li>Offline groups. They were needed 5 years ago when data plans were expensive, but it’s not an issue anymore. Plus we had some horror stories when people expected that a group would be backed up if they lost their phone, but the offline groups obviously were not and the data were lost. Now all groups are backed up, but they still work offline!</li><li>Marking expenses as transfers. In the new version we have a simplified workflow for transfers. Transfers are now always 1:1 transactions.</li><li>Paying debts via PayPal. When we introduced the feature there were no fees, but then suddenly PayPal started to charge for it. We don’t like this approach and are looking for alternative payment providers.</li><li>Negative payments was a workaround for entering “income”. We will support it properly in the future.</li><li>Adding non-existent currencies. We now have a list of all currencies in the world, you should be fine with them.</li><li>Autocomplete for purposes. Your keyboard does autocomplete these days, so it’s no longer necessary.</li><li>Paid, gave and received amounts for each member. It was confusing and hard to understand what these numbers mean. We have decided to keep only the most important number: how much that member spent.</li><li>Clicking on others Who should pay next. It’s easier now based one the size of group circles.</li><li>Copying members was not a frequently used feature.</li><li>Amount that nobody cares about. It was confusing to explain what it means and it wasn’t used a lot.</li><li>Speak who should pay. It was a funny feature which was used mainly to scare people with a robotic voice :)</li><li>Notification preferences. Most of the notifications are important, no need to turn some of them off.</li><li>Turning off the sync lead to data losses for some users, not anymore.</li><li>Changing the app language. We now follow the device language. If you see some mistake in the translations, <a href="https://www.getlocalization.com/settle_up/">help us fix it</a>!</li><li>Import/export. It was actually a source of many bugs, for example if you imported data from another device. Our new synchronization is much more reliable and simple.</li><li>No need for a refresh button, sync now happens instantly!</li><li>Adding more emails you own. It was confusing. Now you can actually sign in with any of your accounts, you can see clearly who has access to your group and with the sharing via link you don’t even need to know your friends’ email addresses.</li><li>Buying author a beer. Thanks for all the beers, but the app is now less a hobby project and more serious, so you can support us better with the Premium plan.</li></ul><p><strong>It’s just a beginning</strong></p><p>Now that we finally released the new app to everyone, we have some strong foundations for the future. We can update the app and add new features more frequently. We are very committed to build the best expense tracking app for groups. Please give us your feedback and we will continue to refine the experience.</p><p>Our priority now is to bring the experience on iOS, Windows and web to the same standard as the Android app. Unify the branding, features, and monetization. We are actually looking for an iOS developer to help us with that, let us know if you are interested. You can still use the old apps on those platforms, they’re fully compatible with the new Android app.</p><p>As for the Android app, these features are on our roadmap based on your feedback:</p><ul><li>Widget for a quick expense. We have heard that the new expense flow is sometimes too many clicks for a simple use-case. We plan to add a widget for the simple use-case. You will be able to add expenses very quickly without even launching the app.</li><li>Archiving groups. We know that sometimes you have too many groups in the app, but you want to archive them, not delete them completely.</li><li>Group premium plan. Not everybody likes subscriptions. Sometimes you only need Premium in that one group. And not everybody has a credit card. So you will be able to purchase a Premium for the whole group via a one-time fee and this will be actually added as an expense into the group so you can split the cost!</li><li>Income. There are use-cases when you actually receive some money for the group (you get a deposit back or you earn something). We plan for a full-fledged support for this use-case.</li><li>Android Oreo support. We all love the latest features of the platform. When you have the latest system version, you will be able to filter some notifications, change shape of our icon or add an expense quickly with a long press on the icon.</li></ul><p>Well, that was quite a long read, but I hope it is a satisfactory answer to “Why did it take you so long?” :) Cheers and <a href="https://play.google.com/store/apps/details?id=cz.destil.settleup">try the app</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea53bfabd96f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/whats-new-in-the-new-settle-up-for-android-ea53bfabd96f">What’s new in the new Settle Up for Android?</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Advanced Tips for Firebase Cloud Functions: Bolt, Testing & CI]]></title>
            <link>https://medium.com/step-up-labs/advanced-tips-for-firebase-cloud-functions-bolt-testing-ci-f15f430e8675?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/f15f430e8675</guid>
            <category><![CDATA[firebase-cloud-functions]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[circleci]]></category>
            <dc:creator><![CDATA[Tomáš Bezouška]]></dc:creator>
            <pubDate>Sat, 17 Jun 2017 10:22:56 GMT</pubDate>
            <atom:updated>2017-06-17T10:22:29.071Z</atom:updated>
            <content:encoded><![CDATA[<p>In the <a href="https://medium.com/@bezytom/our-experience-with-cloud-functions-for-firebase-d206448a8850">previous post</a> I talked about our extensive experience with Firebase Cloud Functions. Today I would like to build on that, adding a few more advanced topics.</p><h3>Simplify Firebase Database Rules with Bolt</h3><p>If you have a complex business logic chances are your Database Rules will be complex as well. After getting to the point where a single rule wouldn’t fit on a screen we decided to rewrite them using <a href="https://github.com/firebase/bolt/">Bolt</a>. Bolt is an official compiler (in beta) which compiles Bolt rules (written in a <a href="https://github.com/firebase/bolt/blob/master/docs/guide.md">custom language</a>) into your typical Firebase rules.</p><p>See a simplified sample for our <em>Member</em> type</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/eb485f57dffaf44a341b9f2a09590700/href">https://medium.com/media/eb485f57dffaf44a341b9f2a09590700/href</a></iframe><p>As you can see, the Bolt language uses types to describe your data and how they should be validated. On top of that, you can use custom functions to provide additional business validation and read/write access logic. It works just like in any other object-oriented programming language, even with generics to describe more complex types.</p><p>The simplification might not be that obvious while you only have read/write rules, but once you start writing data validation logic you will immediately begin wondering why Bolt isn’t the default.</p><p>See what monstrosity the above code compiles into:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a18b8f5626f7ebba0fb894a3aff728e1/href">https://medium.com/media/a18b8f5626f7ebba0fb894a3aff728e1/href</a></iframe><p>Notice how our custom function <em>hasMaxLength</em> compiled into string length checks in 4 different places. If we decide to make any changes, we won’t have to be searching all over the json rules, we will only need to make a single change in the <em>bolt</em> file.</p><p>To use the Bolt compiler, simply install it via npm:</p><pre>$ npm install --global firebase-bolt</pre><p>And compile your <em>database.rules.bolt</em> into <em>database.rules.json</em>.</p><pre>$ firebase-bolt &lt; database.rules.bolt</pre><p>You don’t actually need to compile the <em>bolt</em> file manually, you just need to specify it in your <em>firebase.json</em> file and it will get compiled automatically during deployment.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1dbbc0f9e78a320cab9547935d31c7a/href">https://medium.com/media/b1dbbc0f9e78a320cab9547935d31c7a/href</a></iframe><h3>Testing Functions</h3><p>You might be thinking that since Cloud Functions run <em>in the cloud</em>, there is no easy way to test them. Wrong! It is actually quite easy, there are even <a href="https://firebase.google.com/docs/functions/unit-testing">official docs </a>dedicated to unit testing.</p><p>I’d be lying to say I didn’t struggle at first. That was because I’m mainly a C# developer without much experience with JavaScript and related frameworks. But it turns out getting started is fairly easy, you just need to pick the tools you like. I decided to go for the following libraries (and their corresponding TypeScript definitions) which I installed as devDependencies:</p><ul><li><a href="https://mochajs.org/">mocha</a> — a testing framework which allows you to write async tests</li><li><a href="http://www.sinonjs.org/">sinon</a> — mocking library which you can use to mock / stub / spy on objects</li><li><a href="http://chaijs.com/">chai</a> — assertion library which lets you write more readable assertions</li></ul><p>To a .NET developer, the above libraries would loosely translate to NUnit, Moq and FluentAssertion (for example).</p><p>In an <em>npm</em> project, your tests go into the “test” folder. Running them is a single command:</p><pre>$ npm test</pre><p>Once you have the initial setup it’s “just” a matter of writing your tests. Here’s a sample for validating that <em>Change </em>is generated correctly when a new <em>Transaction</em> is inserted:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0c8d307db7a5ff2871d80a49d06ab3b5/href">https://medium.com/media/0c8d307db7a5ff2871d80a49d06ab3b5/href</a></iframe><p>The test method itself starts on line #51. It</p><ol><li>creates a sample transaction,</li><li>creates a Firebase Event with previous data = <em>null </em>&amp; new data = <em>tx </em>(this means it’s an insert operation),</li><li>calls <em>changes.writeTransactionsChange </em>and grabs the result,</li><li>creates an expected Change object (saying it should be an <em>insert</em> etc.),</li><li>asserts the expected change and actual change are equal.</li></ol><p>To make this whole thing isolated from the actual Firebase servers notice how the ‘ref’ and ‘adminRef’ of the Event are stubbed — the implementing code thinks it’s getting and setting data to Firebase Database, but it is instead only accessing a stub.</p><p>Another thing to notice is that I’m not admin.initializeApp() anywhere. The reason is that this line is only in the index.ts file, which isn’t imported in the tests, so it doesn’t need to be mocked.</p><h3>Deploying Functions from a CI/CD server</h3><p>Continuous integration &amp; deployment (CI/CD) is a must in any non-trivial project. It saves you the hassle of having to run your tests and deploy manually. Not only is this error-prone, since you can just forget to run your tests, but it is also annoying and time consuming. You want to have this automated.</p><p>Our code is hosted in <a href="http://github.com/">Github</a> and we use <a href="http://circleci.com/">CircleCI</a> for running tests and deployments. To tell CircleCI when and how to do those, you need to have a <em>circle.yml</em> file checked into your repository. See a sample below.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f0bf051e73ca738f065bcaada6e46dd/href">https://medium.com/media/1f0bf051e73ca738f065bcaada6e46dd/href</a></iframe><p>I’ll give you a quick overview of what happens when a <em>git push</em> is made to our Github repository:</p><ol><li>Branch that was pushed into is cloned in CircleCI</li><li>Dependencies are installed (<em>Typescript</em> and everything in <em>package.json</em>)</li><li>Typescript is transcompiled into Javascript</li><li>Mocha tests are run</li><li>Functions are (<em>maybe</em>) deployed</li></ol><p>As far as deployment is concerned, we use multiple environments and the build server needs to tell which one it should deploy into (if any at all). This is highly individual and should be tailored to how you need it and what branching strategy you use. We currently:</p><ul><li>Deploy to <em>sandbox</em> on every push to <em>master</em></li><li>Only compile and run tests on other (feature) branches</li><li>Deploy to <em>live</em> if there is a version specified in a tag (e.g. ‘v1.1’)</li></ul><p>I believe most of the commands in the <em>yml</em> file are clear, however, I would like to point out a few perhaps not-so-obvious things.</p><ul><li>The <em>package.json</em> is in a <em>./functions</em> subfolder, which means you can’t just “<em>npm install”</em>, but you need to hint npm the correct location. Moreover, you cannot just “<em>cd functions”</em> because each command is run in a <a href="https://discuss.circleci.com/t/cd-command-ignored-in-test-section/357">separate subshell</a> and doesn’t have any effect on the subsequent commands.</li><li>Our <em>tsconfig.json</em> has <em>watch</em> option set to <em>true</em> to automatically recompile upon making changes. This means the compiler will never finish (until you terminate it) because it’s constantly watching for file changes. This would freeze your deployment, which is why you need to override this option in you compile command.</li><li>Normally when deploying you need to be authenticated for authorization purposes. To deploy from a CI server you need to run $ firebase login:ci on your machine, grab the generated token and save it as a variable on your CI server. Then simply deploy using the <em>token </em>switch, as you can see in the sample <em>yml </em>file.</li><li><em>firebase use &lt;envrionment&gt;</em> actually looks into your <em>.firebaserc</em> file where you have your project project aliases set up.</li></ul><h3>Wrapping up</h3><p>In this post I showed additional techniques we use to simplify working with Firebase Cloud Functions. All of the above are incredibly useful and make our lives a lot easier. With Bolt we understand our security rules without having to read complex and long string expressions inside a json file. Tests cover some of the core business functionality so we don’t need to be afraid to make changes in the future — if we break anything important, we’ll know about it.</p><p>Having a CI/CD setup completes the circle. It guarantees that tests are always run before deployment. It saves us the hassle of deploying manually. And because it is tied with github commits / tags, we can always see what exactly is deployed to which environment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f15f430e8675" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/advanced-tips-for-firebase-cloud-functions-bolt-testing-ci-f15f430e8675">Advanced Tips for Firebase Cloud Functions: Bolt, Testing &amp; CI</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Our extensive experience with Cloud Functions for Firebase]]></title>
            <link>https://medium.com/step-up-labs/our-experience-with-cloud-functions-for-firebase-d206448a8850?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/d206448a8850</guid>
            <category><![CDATA[android]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Tomáš Bezouška]]></dc:creator>
            <pubDate>Mon, 13 Mar 2017 16:08:24 GMT</pubDate>
            <atom:updated>2017-03-15T09:06:25.787Z</atom:updated>
            <content:encoded><![CDATA[<p>Just a few days ago, Google <a href="https://firebase.googleblog.com/2017/03/introducing-cloud-functions-for-firebase.html">announced</a> the beta launch of <a href="https://firebase.google.com/docs/functions/">Cloud Functions for Firebase</a>. In a nutshell, they are small pieces of JavaScript functions which are deployed to Firebase servers and executed in response to various events — such as a change in Firebase Database or a new user login.</p><p>We at <a href="https://medium.com/step-up-labs">Step Up Labs</a> have been working with Google for the past year or so and are very excited to see the product finally make it to the public beta. As I’ve been working with the Cloud Functions for quite some time now, I thought I’d share some of the details of how we use them in our main product — <a href="http://www.settleup.info/">Settle Up</a> — and the experience we have gained so far. I won’t be describing the API or going over how exactly to work with the Functions, you have the official <a href="https://firebase.google.com/docs/functions/">docs</a> and <a href="https://github.com/firebase/functions-samples/">samples</a> for that.</p><h3>About Settle Up</h3><p>Let me first briefly tell you what the app does. Settle Up is an app for everybody who needs to track shared expenses. It’s perfect for travelers, flatmates and friends who don’t want to argue over who should pay next or who owes to whom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V8ExHJndeY4inXWF7JFniw.png" /></figure><p>In the app, you can create separate groups (e.g. “Skiing trip 2017”). Within each group you can enter members (your friends who went skiing with you) and individual expenses (gas, tickets, hotel, etc.). Based on these expenses, the app can tell you at the end of the trip who should pay whom to break even. One useful feature is that the individual expenses can even be in different currencies, while the debts are displayed in your “home” currency.</p><p>All this information — groups, members, expenses and other data — is managed by individual client applications and stored in Firebase Database. There are however some vital parts which we decided to delegate to Cloud Functions.</p><h3>Reacting to group changes</h3><p>One thing we want the users of Settle Up to see are the changes done within each group. For example when someone deletes an expense there should be a record about that showing who deleted it. This is a perfect use case for the Cloud Functions. The snippet below roughly shows how we do it (simplified for clarity):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2360c2196483a841647a26d3665ce0b5/href">https://medium.com/media/2360c2196483a841647a26d3665ce0b5/href</a></iframe><p>Notice a couple of things here.</p><ul><li>We use <a href="http://typescriptlang.org/">Typescript</a> which gets transcompiled to pure Javascript (currently ES6). This significantly simplified development during the pre-beta phase where API changed quite often, because the compiler would immediately tell us what is broken. Even with beta I highly recommend using Typescript because it greatly boosts your productivity at virtually no cost.</li><li>We use <em>async / await </em>which simplifies the code by removing all those annoying callback functions and makes it look like any other synchronous code. This is currently a Typescript-only feature which compiles down to <a href="https://medium.com/javascript-scene/the-hidden-power-of-es6-generators-observable-async-flow-control-cfa4c7f31435#.p0fpd7nmc">generators</a>. The good thing is it uses Promises which the Cloud Functions work with out of the box.</li><li>We use <em>admin.database.ServerValue.TIMESTAMP</em> placeholder for setting server time.</li><li>We need to find out who was the author of the change. There is currently no documented way to do this, only undocumented one — the user id is set inside <em>event.auth.variable.uid. </em>There are situations when this isn’t set (making changes directly in Firebase Console for example) so you need to have a check for this, otherwise the <em>by </em>variable becomes <em>undefined</em>, which cannot be saved into Firebase Database.</li></ul><h3>Sending push notifications</h3><p>Another step after generating a change in the app is to send a push notification to subscribed clients. When a user logs in on their device the app requests a registration token and saves it to Firebase Database. This is what our structure looks like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/890b385a32b8f76b66b99fee58be3941/href">https://medium.com/media/890b385a32b8f76b66b99fee58be3941/href</a></iframe><p>There is a nice official sample how to send push notifications with Firebase on <a href="https://github.com/firebase/functions-samples/blob/master/fcm-notifications/functions/index.js">github</a> so you can start there. I’ll just outline a few things:</p><ul><li>use the Firebase <a href="https://firebase.google.com/docs/cloud-messaging/admin/">Admin SDK</a> to send notifications, so you won’t have to deal with authenticating to Firebase servers and doing manual HTTP requests;</li><li>you cannot send <em>null</em> values in your payload;</li><li>be sure to process the results of the <em>send..()</em> methods and remove the tokens which FCM servers mark as invalid (as seen in the github sample);</li><li>tailor the notifications to the individual platforms. Notice we have the platform information for each push registration which allows us to create a different payload for each platform. The payload structure is described<a href="https://firebase.google.com/docs/cloud-messaging/http-server-ref"> here</a>.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/83d446eca03da922c771b0532e783e55/href">https://medium.com/media/83d446eca03da922c771b0532e783e55/href</a></iframe><p>This snippet shows two types of payload — the raw one, which is sent to the web app and Android devices, and the iOS one sent to iPhone users. The raw payload contains plain JSON which the Android version of Settle Up processes on the background and groups corresponding notifications together into single notification. It works similarly with our <a href="https://medium.com/step-up-labs/our-experience-with-firebase-cloud-messaging-318043e667e3#.85fo0ua22">web app</a>.</p><p>The iOS payload on the other hand doesn’t allow any processing and is simply presented on the device as it arrives. Using <em>body_loc</em> and <em>title_loc </em>properties ensures that the notifications are correctly localized.</p><h3>Working with exchange rates</h3><p>As Settle Up allows to enter expenses in various currencies we needed a way to work with exchange rates to allow conversion into one group currency. For that there are three pieces of puzzle required:</p><ul><li>store exchange rate between <em>expense </em>currency and<em> group</em> currency for each expense;</li><li>have a centralized storage of exchange rates within Firebase Database;</li><li>allow changing group currency to show debts in a different currency.</li></ul><p>Having a single location for exchange rates within our database simplifies development of the client apps — to get a currency rate they only need to access single Firebase location and don’t need to worry about anything else. This location has exchange rates between any world currency and USD, gets updated daily and keeps the history for every day. There is also a special node called “latest” which has the latest exchange rates.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d95aead2b946bb265c88ca2d805d90f/href">https://medium.com/media/4d95aead2b946bb265c88ca2d805d90f/href</a></iframe><p>To fetch the latest rates every day, we use an HTTPS trigger in Cloud Functions and Google App Engine CRON job which invokes it every day.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2b80620236db5b0df8c6843950baaa25/href">https://medium.com/media/2b80620236db5b0df8c6843950baaa25/href</a></iframe><p>One thing I’d like to point out is the <em>response.end()</em> which properly closes the incoming HTTPS requests. Without it the incoming requests will time out.</p><p>As you can see, we use Yahoo as a source of exchange rates, but this is an implementation detail which we can easily change in our Cloud Functions without having to make any changes to the client apps.</p><h4>Changing the group currency</h4><p>Changing the group currency is not very straight-forward. Before actually changing it we need to iterate over all expenses in the given group and update their exchange rates. Only after all expenses have the updated exchange rates can we update the group currency. It’s obvious that this needs to be a server function.</p><p>We decided to have a dedicated location in Firebase Database called “serverTasks” and have a cloud function watching this location and triggering corresponding functions. Sure, it could be just an HTTPS request (like in the case of getting the latest exchange rates every day) but that would complicate the client code. Simply writing to a Firebase location and observing it to get the result of the operation was just easier.</p><p>Here’s what the Database structure might look like:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51282182e3bac46cee0189a0d0bfe9fc/href">https://medium.com/media/51282182e3bac46cee0189a0d0bfe9fc/href</a></iframe><p>And here’s the function to change the group currency itself along with registration:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3cf875202d6a9e9161c51db761cdb133/href">https://medium.com/media/3cf875202d6a9e9161c51db761cdb133/href</a></iframe><p>Again a few notes about the implementation:</p><ul><li>We use <em>adminRef</em> to write the response code because the <a href="https://firebase.google.com/docs/database/security/">Database Rules</a> prevent anyone else from writing it. This is by design because we only want the Cloud Functions to be able to write there. It is generally a good idea to spend a bit of time thinking about your Rules and the implications they will have.</li><li>The function writes the updates at the very end in a form of a single<a href="https://firebase.googleblog.com/2015/09/introducing-multi-location-updates-and_86.html"> multi-location update</a>. This is useful for two reasons: it ensures we don’t end up in a corrupt state in case of an error halfway through processing and also, it is faster.</li><li>Before writing the data the function first checks whether the original task still exists. If not, it means that processing of the task took too long and the client app deleted it.</li></ul><h3>Shortening Dynamic links</h3><p>To join a group the user must be invited via a <a href="https://firebase.google.com/docs/dynamic-links/create-links">Dynamic link</a>. When the user clicks the link they are redirected to the Settle Up app and they are offered to join the group. The link is generated locally by the client app and looks something like this:</p><pre>https://abc123.app.goo.gl/?link=https://example.com/&amp;apn=com.example.android&amp;ibi=com.example.ios</pre><p>That’s a pretty long and ugly link. It is however possible to shorten it using a single HTTP POST. Again, to simplify the client code, this shortening is done on the server:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb1071ea16a1cff8b803a49cf3409072/href">https://medium.com/media/bb1071ea16a1cff8b803a49cf3409072/href</a></iframe><p>There are two points of interest here. One is how we check whether the link is long (not shortened) — simply by inspecting whether it contains “?link”. This is probably over-simplified, but it works.</p><p>The other one has to do with multiple environments. You see, we actively use three environments — sandbox, alpha, and live. The endpoint for shortening links requires an API key of our app (~environment) and since we have three of them we need to make sure the correct one is used in each one of them.</p><p>To achieve that we use <a href="https://firebase.google.com/docs/functions/config-env">Firebase Config</a>. Setting up the config is currently a set of the following commands ran once against each environment:</p><pre>firebase use sandbox<br>firebase functions:config:set local.apikey=&quot;&lt;APIKEY&gt;&quot;<br>firebase deploy --only functions</pre><h3>Conclusion</h3><p>As you can see, we use Firebase and Cloud Functions quite heavily. We also use them in some other scenarios I haven’t mentioned — for example deleting an entire group (which deletes data from multiple locations, as well as from Firebase Storage).</p><p>Overall, we’re pleased with where the development is going and the progress the Firebase team have made. Functions are extremely useful to us for a bunch of reasons:</p><ul><li>They heavily simplify the development of our client apps — what would need to be written multiple times for each client platform can only be written once.</li><li>Eliminate various edge cases — some functionality could suffer from them if it were implemented in client apps, for example during loss of internet connectivity.</li><li>Our client apps are more secure — we don’t need to store API keys to various services within the apps but only on the server.</li><li>Sending push notifications is incredibly easy to implement.</li></ul><p>In terms of performance and stability, this has fluctuated during the pre-beta phase of the product but has become pretty reliable as it was approaching the beta release. As far as we can tell, there are no critical issues now that would prevent you from using the Cloud Functions effectively.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d206448a8850" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/our-experience-with-cloud-functions-for-firebase-d206448a8850">Our extensive experience with Cloud Functions for Firebase</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Firebase Storage C# library]]></title>
            <link>https://medium.com/step-up-labs/firebase-storage-c-library-d1656cc8b3c3?source=rss----e1f308ab7aa8---4</link>
            <guid isPermaLink="false">https://medium.com/p/d1656cc8b3c3</guid>
            <category><![CDATA[cloud-storage]]></category>
            <category><![CDATA[firebase]]></category>
            <category><![CDATA[csharp]]></category>
            <category><![CDATA[firebaseauthentication]]></category>
            <dc:creator><![CDATA[Tomáš Bezouška]]></dc:creator>
            <pubDate>Tue, 03 Jan 2017 15:03:33 GMT</pubDate>
            <atom:updated>2017-01-03T13:58:52.350Z</atom:updated>
            <content:encoded><![CDATA[<p>After <a href="https://medium.com/@bezytom/firebase-c-library-5c342989ad18">FirebaseDatabase.net</a> to access your database and <a href="https://medium.com/@bezytom/firebase-authentication-c-library-8e5e1c30acc2">FirebaseAuthentication.net</a> to have your requests authenticated, the time has come for another piece of the Firebase puzzle — Storage.</p><h3>Firebase Storage</h3><p>Before we talk about the library I recommend you to get familiar with Firebase Storage. You can read about it in the <a href="https://firebase.google.com/docs/storage/">official docs</a>. In your <a href="http://console.firebase.google.com/">Firebase Console</a> just click on Storage and you will see all files uploaded to your app. You can also specify your custom rules to allow or deny uploading to specific folders.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qzkUWDUrFNWEiSNB." /></figure><h3>FirebaseStorage.net</h3><p>The library itself mimics the official <a href="https://firebase.google.com/docs/storage/web/start">Javascript SDK</a>. So far it lets you do three things:</p><ol><li>Upload any content to Firebase Storage</li><li>Get a download link</li><li>Delete files</li></ol><p>Here is a sample use (.NET Framework 4.5):</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb058fc16280ccb746423181f83ddad5/href">https://medium.com/media/bb058fc16280ccb746423181f83ddad5/href</a></iframe><p>As you can see, it is fairly simple. When you call <em>PutAsync </em>to upload the file you get back an instance of <em>FirebaseStorageTask</em>. You can attach an event handler to it to track the upload progress and use <em>await</em> to wait until the upload finishes.</p><p>What you may have noticed about the <em>PutAsync </em>method is that it does not actually accept a file reference as its parameter but rather a <em>Stream</em>. This makes it easier to keep this library multi-platform and allows you to upload any content — not just files. For example you can use <em>MemoryStream </em>to construct the content in memory and then just upload it as if it were a file.</p><p>In case you are wondering, yes, authentication is also supported. Check out my post about <a href="https://medium.com/@bezytom/firebase-authentication-c-library-8e5e1c30acc2">FirebaseAuthentication.net</a>, it works the same way here.</p><p>For more samples, check out the <a href="https://github.com/step-up-labs/firebase-storage-dotnet">Github repository</a>. Other than authentication the sample also shows you how to cancel a running upload.</p><h3>Where can I get the library?</h3><p>Install it via Nuget:</p><pre>Install-Package FirebaseAuthentication.net</pre><pre>Install-Package FirebaseStorage.net -pre</pre><p>Following frameworks are supported:</p><ul><li>.NET 4.5+</li><li>Windows 8.x</li><li>UWP</li><li>Windows Phone 8.1</li><li>CoreCLR</li></ul><p>If you have any questions or encounter any errors just <a href="https://github.com/step-up-labs/firebase-storage-dotnet/issues/new">raise an issue</a> on GitHub.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1656cc8b3c3" width="1" height="1" alt=""><hr><p><a href="https://medium.com/step-up-labs/firebase-storage-c-library-d1656cc8b3c3">Firebase Storage C# library</a> was originally published in <a href="https://medium.com/step-up-labs">Step Up Labs</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>