7

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

hichris123
  • 10,145
  • 15
  • 56
  • 70
BillHaggerty
  • 6,157
  • 10
  • 35
  • 68
  • Because the question is incomprehensible. What do [Chrome Apps](https://developer.chrome.com/apps/about_apps) have to do with it? How a [presumably native] Android app can "work well on Chrome"? – Xan Apr 02 '15 at 13:12
  • 1
    https://developer.chrome.com/apps/getstarted_arc#bestpractices – BillHaggerty Apr 02 '15 at 13:14
  • I think a chrome app wraps the apk somehow allowing the App Runtime for Chrome (Beta), or ARC to execute a native android app. – BillHaggerty Apr 02 '15 at 13:15
  • I am unsure how any of this in incomprehensible, please explain @Xan – BillHaggerty Apr 02 '15 at 13:18
  • It is incomprehensible because the ARC part is not explained well - for instance, I missed it. It is curious though, the google-chrome-app tag is a bad fit but I don't think there is a tag for ARC yet. I'll look into it. – Xan Apr 02 '15 at 13:21
  • "Android app on chrome using ARC" is in the title. I didn't think I would have to prove the existence of a technology before asking a question about it. – BillHaggerty Apr 02 '15 at 13:23
  • "ARC" was the first tag I tried, does not exist. – BillHaggerty Apr 02 '15 at 13:26
  • Well then, I shall create the tag. – Xan Apr 02 '15 at 14:01
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/74362/discussion-between-theyouthis-and-xan). – BillHaggerty Apr 02 '15 at 17:13

2 Answers2

7

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.

CSX321
  • 347
  • 2
  • 4
3
{"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)

Dipendra
  • 1,547
  • 19
  • 33