Thanks for responding, I appreciate it!
There is another complication I realize I forgot to mention. The AAR needs to
support intents. So when the Android app is built we need to be able to put our
intents, mapped to the appropriate classes into the manifest. Is there anyway
to do that in 'stock' XWalk? And how would we include the AAR anyway? We still
need XWalk's build to include it even if we are going to call it via reflection.
It feels like the embedding API might be cleaner since this would, if I'm
understanding it correctly, basically let us write an Android app that does
whatever we want and then just call XWalk to handle the rest. But you mentioned
"this way needs some additional effort". The docs didn't mention any open
issues. Could you please help me understand what sort of problems I'm likely to
face?
I'm just trying to understand where the challenges are before I commit to a
path.
Thank you and thank you especially for XWalk!
Yaron
________________________________________
From: Min, Hongbo <[email protected]>
Sent: Monday, August 11, 2014 9:19 PM
To: Yaron Goland; [email protected]
Cc: Huo, Halton
Subject: RE: Crosswalk and an Android extension
Hi Goland
Thanks for using Crosswalk. Since the external Crosswalk extension on Android
is loaded at runtime through Java reflection mechanism, if you want to call out
other modules (e.g. AAR as you mentioned), one thing you may need to do is to
make JVM be able to load the required classes at runtime, e.g. via Java
reflection.
Another alternative way is to use Crosswalk Embedding API (see
https://crosswalk-project.org/#documentation/apis/embedding_api) to generate
an Android project, but this way needs some additional effort.
Thanks...Hongbo
> -----Original Message-----
> From: Crosswalk-help [mailto:[email protected]
> project.org] On Behalf Of Yaron Goland
> Sent: Thursday, August 7, 2014 12:21 PM
> To: [email protected]
> Subject: [Crosswalk-help] Crosswalk and an Android extension
>
> We are using Crosswalk as part of a peer to peer web project called Thali [1].
> We support enabling Android, Linux, Mac and Windows to communicate
> directly to each other via Tor hidden services. Identity is handled via mutual
> ssl auth and self generated certs. Data is synchronized using CouchBase Lite,
> an embedded version of CouchDB. Our primary app development
> environment is HTML 5. We use nanohttpd to serve up the app on the
> desktop and Crosswalk on Android. The developer writes to PouchDB and we
> then handle replicating the data, managing identities, etc.
>
> The reason I'm bothering this group is that we need to be able to embed
> with our Crosswalk clients Tor support. This requires using a custom binary
> for Android (provided by the Guardian project) along with some very
> Android specific logic. We then need to start up the Tor Onion Proxy (OP).
> We actually released a stand alone library for this purpose that generates
> both an AAR for Android as well as a Jar for Linux, Mac and Windows. [2]
>
> So what we need is from our existing Crosswalk extension [3] to be able to
> call out to the AAR generated in [2] and start up the Tor OP. But this means
> putting in a dependency on the AAR and being able to call it. That doesn't
> seem possible since near as I can tell Crosswalk extensions have to be plain
> Jars and thus can't have dependencies on AARs.
>
> Is there a way to package the AAR with the Crosswalk app and call out to it?
>
> Thanks,
>
> Yaron
>
> [1] http://www.thaliproject.org/mediawiki/index.php?title=Main_Page
> [2] https://github.com/thaliproject/Tor_Onion_Proxy_Library
> [3]
> https://github.com/thaliproject/ThaliHTML5ApplicationFramework/blob/ma
> ster/Android/src/main/java/com/msopentech/ThaliClient/ProxyExtensionCli
> ent.java
>
> _______________________________________________
> Crosswalk-help mailing list
> [email protected]
> https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help
_______________________________________________
Crosswalk-help mailing list
[email protected]
https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-help