Saturday, May 13, 2017

2 months into Kotlin and the app is in Beta

I have not quite been at the new job 2 months yet and I submitted the app to a closed Beta on the Google Play Store. First interaction with the new Play Store UI which was a bit frustrating. I got all the pieces in place finally. You have to jump around a lot between the app and managing the Beta email list.

Feels darn good to have the app out there. It has been a bit of a challenge due to server side fun. There were some REST calls that seems quite silly and they worked them over so I sent / received a lot less traffic to do the work I needed.

Learned how to use a 3rd party UPC scanner, credit card swiper and credit card signature control. The CC swiper was the hardest as the documentation was lacking and so, thanks to the fine decompiler in Android Studio, I ended up sniffing around the API the hard way to find what I wanted.

Basic stats on the app

26 Activities
 9 Fragments
11 Dialogs
15 Adapters (ListView or RecyclerView)
 5 Custom controls written by me
59 Layouts (lots of row types)
48 unique REST calls

Not a small app but not massive either. All the code I wrote was in Kotlin, no Java on my side. For my first full Kotlin app I am very happy with the language. I would not switch back to Java at this time. I learned a ton and refactored a lot during the app development cycle. I kept finding better ways to do things in Kotlin saving even more lines of code. Support for round icons for Nougat and above. Making all the special permission asking calls as well. Not too many of them but the CC swiper needs to have access to the microphone, I need access to external storage and locations services.

QA has been pretty smooth too. They are finding the edge case stuff because we have a great QA team. I just don't see NPE things which were always frustrating when doing Java coding. I have been able to knock out the bugs within an hour of them showing up in most cases.

There is more to do on the app to get it in feature sync with the iOS version. What is there is very functional and fully usable by the target audience. It is also only being released to a small Beta team to start. I will continue to add the other features with a planned full release in early June. I need to deal with returns, some image capture and manipulation, and tie in to social media apps. There are parts of the Android app that are cleaner and easier to use than the iOS app so it also needs to get in sync with Android on that side. Good to have each team member push the other one.

Late in testing we were having some timeouts with the credit card processing. 3rd party service we use. Default timeout is 10 seconds for Retrofit + OKHTTP. Upped that to 30 seconds and things went smoother. Very happy with Retrofit, OKHTTP and Moshi. Had not used them before. I was on Volley + GSON in the past. Don't miss Volley at all. Retrofit makes it super easy to set up the REST calls with annotations. Using Moshi because it is already being used by the OKHTTP stack so what the heck. No need to toss in another library.

Time to enjoy the fact it was released and then start hammering away at the next parts of the app. Will be interesting to see what feedback we get from the Beta group. QA, other staff and myself had beat on it pretty hard. I pulled it into DDMS and went to each screen and did a kill process to make sure it survives that. Couple of tweaks there and all was fine. My first proguard configuration worked as well. I was able to run every part of the app. Hopefully this works fine on all the devices out there - looking at you Samsung.

Went minimum SDK level of 19. I have tested on 480x800 displays as well. Figure that covers a massive majority of phones. My guess is most real world devices with be above 19 and with much larger screens. QA did testing on 7" tablets as well. No special tablet code in there as far as bonus layouts. I see some places that would be handy though.

I have a Note 4 running Marshmallow and have been testing on that when not in an emulator. Good to have a Samsung Device for testing but I really want to upgrade my phone. Waiting for the new Pixel 2 and OnePlus 5 to arrive before I pull the trigger