No one likes to talk about death, much less plan for it.

But if you don’t think about what happens to all that data stored on your phone, you could create some serious problems for a loved one should you pass away unexpectedly. That’s because your mobile device, and by extension your Google account, hold key financial data, passwords, connections to other accounts, and of course a lot of pictures, especially if you’re using the new Google Photos for backup.

If you don’t plan ahead for someone to access your smartphone and account data, it could be a serious headache for those close to you.

Fortunately there are a few simple steps you can take to ensure the right person gets access to your phone and the right data without compromising your day-to-day security. Here’s how to set up a nearly foolproof system that protects your accounts but lets the right person in should something unfortunate happen.

Use Google’s Inactive Account Manager

Google has done a good job with a comprehensive, easy-to-follow method for ensuring only someone you identify gets access to your Google account. It’s called Inactive Account Manager—you can dictate who can assume control of your account should it stop seeing activity for three months or longer. You can then designate up to 10 different contacts who to get access. You can even create a custom message for those people to receive, if you’re into that.

Google accounts Specify how long your account needs to go dormant before it’s considered by Google to be inactive.

Since you’re an Android user, your Google account is a key piece of your online identity. If you pay your bills, have mortgage statements, or other important financial information saved in your Gmail or Google Drive, access to this can be invaluable for a loved one.

Should something happen to you, your significant other or a family member may have a much easier time taking care of key details if they’re able to access your smartphone and get into your Gmail archive. Gmail’s been around for ten years now, so if you’ve been using it for even half that long there are probably a lot of details saved there you would want someone to have.

However, if for some reason you want all your data to disappear when you do, opt for your account to delete itself after a specified period of inactivity. This section is pretty straightforward: just select this choice and then you’ll know that nothing that belongs to you will float out there in the Internet when you’re gone.

Set the right level of device security

Most Android phones allow for some type of password or PIN to unlock the device. So make sure the right person knows how to get in to your device should something go awry.

Samsung Galaxy S6, S5, and Note 4 all offer fingerprint unlock.

Fingerprint scanners, like the one on the Galaxy S6 and Edge, provide much deeper security than a PIN. But be sure someone knows how to get in to your device with a backup PIN if you’ve gone the fingerprint route. This can avoid an extreme solution in order to access your device, which may be necessary for notifying relatives or friends of your demise. Again, just like having an escape plan should your house catch fire, you should think ahead about this so someone you care about doesn’t have to deal with this as a problem as well.

Use a password manager

If you have a spouse or significant other, the best solution is to use a shared password manager account. All your logins and passwords are securely through Dashlane, LastPass, or another alternative. I’ve become a particular fan lately of Dashlane, which has a great interface and integrates with SwiftKey for easy password entry.

Dashlane is one of several password managers that can save all your account data.

By sharing an account, all your passwords are safely shared. If you don't want to share a single account, you can at least make sure someone you trust has your master password and knows how to access your account.

Dashlane also stores your credit cards and Secure Notes, which is a great place to keep sensitive information like a Social Security number.

The bottom line is to use common sense and not ignore the issue of your inevitable demise. Thinking about what happens to your smartphone and account data when you pass on is just as important as having a will and managing other end-of-life issues. Take the time to do it. This will give you and your loved ones peace of mind so you can focus on living.