Implement data uri out of ARC into the browser
Reported by
cjava...@gmail.com,
May 25 2016
|
|||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Steps to reproduce the problem:
We have a dilemma. We have implemented an Android app and are running it on Chromebooks. Most of the time it is offline use.
It is necessary now to print a receipt from the app. Since this is not supported via ARC, I'm opting to open a web page with onload=print.
What is the expected behavior?
What went wrong?
JavaScript URI
startActivity(new Intent(Intent.ACTION_VIEW).setData(Uri.parse("javascript:document.write('...')")));
I half expected to work, but doesn't have any effect other than showing toast "Opening in Chrome"
Data URI via ACTION_MAIN
startActivity(Intent.makeMainSelectorActivity(
Intent.ACTION_MAIN, Intent.CATEGORY_APP_BROWSER)
.setData(Uri.parse(url.toString())));
This works on Android to load a data uri, but there are no intent-filters to match and thus an exception is thrown.
Did this work before? N/A
Chrome version: 50.0.2661.103 (Official Build) (32-bit)) Channel: n/a
OS Version:
Flash Version:
I think that the most straight-forward thing is to allow use of
startActivity(Intent.makeMainSelectorActivity(
Intent.ACTION_MAIN, Intent.CATEGORY_APP_BROWSER)
.setData(Uri.parse(url.toString())));
to pass the designated URI into a new tab of Chrome, just like ACTION_VIEW does for https urls
I am in a situation where I need this to be implemented ASAP, so if you can either do that OR.. suggest an alternative that would be GREAT.
I think data: uri is the best way, but it really seems like there should be *some* way to pass data out of the ARC without requiring an internet connection.
,
May 25 2016
,
May 26 2016
It's expected that file: intents do not work, because ARC has a different view of file system than Chrome, and passing a path won't work. I suspect data: could work.
,
May 26 2016
I agree. It seems like data: URI support would be easy to implement. (possibly as simple as adding ACTION_MAIN and CATEGORY_APP_BROWSER the built-in intent-filters) So I'm hoping for a quick response. I understand that you guys have requirements (scheduling, code review, security consideration, release process), so when you get an idea when it could be released I'd appreciate a heads-up so I can get this moving on our end.
,
Oct 27 2016
There is a new ARC which is based on Containers instead of NaCI. https://developer.android.com/topic/arc Looks we can close this issue.
,
Mar 30 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by cjava...@gmail.com
, May 25 2016