Google Maps Crashes Around The World

Share if the site was helpful

Google Maps Crashes Around The World

A few days ago, panic struck apps around the world.  In a nightmarish turn for any developer, every app using Google Maps crashed.  Not just once, but every time it attempted to load Google Maps.  The result being if you launched the Maps SDK on launch, 0% of users could open your app.  Not. Good.

Fallout and Recovery:

A little while after the crisis bubbled up Google released a hotfix.  But users who had experienced the crash were doomed to continue experiencing it.  That is until they either cleared their cache or uninstalled the app.  Developers were forced to release their own updates with a suggested bit of solution code.  Unfortunately, even with this fix only users who updated their app could be free of the bug.

Apps are still climbing back from this fall, but the experience brings up a couple key components of app development that we’ve talked about here at RootJunky before.  These include error handling, dealing with live production changes, and utilizing crash reporting tools like Firebase.

Ignorance Is NOT Bliss:

When it comes to app crashes, it is never a good thing to turn a blind eye.  Something like the above may have occurred that isn’t necessarily your app’s fault, but you still need to know when to react.  Google has now released a new version of Google Play Services that fixes the issue, but this took days and every hour counts when it comes to things like app ratings and revenue.

Being aware of the crash at hour 1 gives your team time to evaluate the issue and begin investigating possible solutions.  And let’s not forget about the pesky fact that ALL developers introduce bugs sometimes.  Seeing your new app version start to crash more often than others can be crucial if you need to address something before it is released to all users.  Long story short: without crash reporting from a tool like Firebase you’re up a creek without a paddle.

Error Handling:

When our apps do experience issues, it’s also important they are able to be handled correctly.  Sometimes crashing an app can be the best outcome of a situation, but what about scenarios where the issue isn’t that serious?  For example what if our app couldn’t load a user’s info.  Would it be better to display a message to the user telling them to try again later?  Or would it be better to inexplicably crash the app on them?

This is where error handling comes in.  Using things such as try-catch statements can allow us to handle issues in the app’s code without destroying the user’s experience.  In the “try” section of your code you attempt to do something.  And then in the “catch” section you handle any error that may have taken place.  If you’ve ever built an app you’ve undoubtedly used try-catch, but are you using it in all the right places?

Remote Config to the Rescue?

One other option that we’ve discussed before is Remote Config.  Using this tool you have the ability to change settings of your app remotely without having to release an update.  Let’s relate this to the Maps SDK crash.  We could set something up in our code to check if a Remote Config value shouldInitializeMaps is true.  If so then we load a map, otherwise don’t even present this option to a user.  By setting things up this way we now have the option to shut off Google Maps if it becomes problematic.

Bill Gates captured it quite well when he said “It’s fine to celebrate success but it is more important to heed the lessons of failure”.  When things go wrong we should view them as a learning opportunity for how to make our apps even stronger down the road.

 

Let Firebase Cover the Basics For You

Share if the site was helpful

Let Firebase Cover the Basics For You

When it comes to writing code, the less you have to do the better.  You want control over how your applications behave, but if you can piggy back off of other developer’s work then that’s generally a good thing.  And if you’re hoping to be an app developer, then one of the best tools for piggy backing is Firebase.

Using others to your advantage:

If you think about it even developing the most basic app takes the work of countless others.  Someone else had to develop the programming language you’re writing in, someone else had to build the IDE (probable Android Studio) that you’re developing on, and someone had to…well you get the point.  Any modern-day invention was not created from nothing, it came about thanks to the ground work being done by something that came first.

This doesn’t mean you can’t be innovative.  It means that there’s nothing wrong with using 3rd party libraries and tools to make your development journey easier.  If you don’t have to worry about the basics then you can focus on what makes your app great.  Ok enough justification, let’s talk about how you should use Firebase to make life easier.

Authentication and Data Management:

How many apps do you have that require you to sign in to fully use features?  Of those how many let you create and account through Facebook?  Users hate having to create sign-in info, a decent percentage won’t even go through the process because of the extra 10 seconds it takes.  So including an option for one-click sign in makes it more likely your app will succeed from the start.  Firebase makes this feature easy to leverage allowing you to create a sign in screen with companies like Facebook, Twitter, and Google. 

When users sign up Firebase keeps track of their info and allows user management to be easily configured.  If a user gets a new phone they can log in and Firebase will associate them with the same account.  Firebase also has a database feature allowing you to create and store JSON info, so users can interact with one another and store information easily.  Let’s say you wanted to create that new social media app which lets people post pictures and message one another:  Firebase should be your go to.

Analytics:

When you release an app it’s best to have a game plan for what’s next.  What if users love one part of the app but never use another?  Well if that’s the case then you should aim for a redesign that either brings in new features or directs the users attention to things they are more interested in.  Of course if you release an app and people in other countries start downloading it you can’t exactly track them down and ask them how they’ve been using the app.

This is where analytics come in.  Firebase gives you the capability to monitor user events (anonymously) so you can see which features are getting the most interaction.  If you have a search bar in your app that no one ever clicks on, it’s either time to drop it or move it elsewhere to try again.  Analytics can keep you in know for how your app is behaving and what should change.

Crashlytics:

And on the topic of what should change in app behavior, crashes are about the worst thing a user can experience.  You may be getting 1 star ratings in the app store because your app shuts off randomly for some users and you don’t know why.  Firebase offers Crashlytics to look at the stack trace details for every crashed application.  If there’s one button in your app that is broken and slipped through your checks when publishing, now you’ll be able to see that it’s responsible for the crashes and act accordingly.

Firebase offers a ton of other features that can make development easier and the user experience more fluid.  These are just the tip of the iceberg and features I enjoy using on a daily basis.  If you want to learn how to incorporate Firebase into your apps then checkout Phonlab’s Android Development Course!

 

en English
X