Android UX – When to use Bottom navigation and when to use Tabs

I look at Material Navigation pattern on material.google.com It shows that android officially has Bottom navigation for Android UI

Before March 2016 Android seriously put the page switch on top tabs or Drawer but today the guideline allow UI Designer to choose what we want.

enter image description here

What is criteria for UX designer to choose between Tabs and Bottom navigation? It makes sense for Material Design on iOS but Photo App also use Bottom tab on Android

enter image description here

So, If my app includes 3-4 main views, what should I use? Tabs or Bottom navigation?

Thanks