Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 409
BillHaggerty Avatar asked Apr 01 '15 20:04

BillHaggerty


2 Answers

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.

like image 91
CSX321 Avatar answered Oct 13 '22 03:10

CSX321


{"sleepOnBlur":false,"disableAutoBackButton":true}

please supply the above metadata before you download the zip or launch app from the arc welder

the first param prevents excessive pause/resume and also supposed to fix short black screen flash occurring occassionally in some of the apps.

the second params adds persistance back button on top left hence helping to avoid extra code required because of absence of back button in some screens(mostly the first screen)

like image 41
Dipendra Avatar answered Oct 13 '22 02:10

Dipendra