Search code examples
androidgoogle-chromegoogle-chrome-arc

Android app on Chrome using ARC, keep back button on top enabled


developer.chrome.com/apps/getstarted_arc#bestpractices

The ARC allows you to execute native android apps through the chrome browser by wrapping a chrome app around it.(As far as I can tell)

I am re-factoring an Android app to work well on Chrome. The first thing I need to do is to make the back arrow enabled at all times on the top left as shown below. enter image description here

This is the program that allows Native android apps to run through chrome. I think the answer to my question lies somewhere in "Additional Metadata", or in the source code?

enter image description here


Solution

  • Add {"disableAutoBackButton": "true"} to the metadata. That will enable the back button within an activity. I've found that with my app that has multiple activities, though, it doesn't work to return to my main activity from my settings activity. It could be that I'm doing something wrong with the way I'm handling activities, I guess, but it works on all physical devices.