You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Mike Dawson <mi...@ustadmobile.com> on 2015/01/12 12:55:42 UTC
Documentation on Android/Cordova Webview
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Cordova Dev List,
I'm looking to build a Hybrid app version and tried following:
http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md.html#Android%20WebViews
I think this might be a bit out of date. I am running Cordova 4.2 and
compiling with API Level 19; all on Ubuntu 14.10 which is all running
fine for normal cordova and android development.
The documentation says to unzip the download (whereas the main site
recommends the normal installation using npm). It then says to go to
the android package framework directory. There is no such framework
directory either in a created project or in
/usr/local/lib/node_modules/cordova or in a newly created cordova
project with the android platform added.
What does seem to work is to create a blank cordova project; add
android, and then use the CordovaLib project generated as a library for
another native android project; e.g.
#native android project here
mkdir androidproject
cd androidproject
android create project --target 6 --name UstadMobile --path
./ustadmobile --activity UstadMobile --package com.toughra.ustadmobile
cd ..
cordova create umcordovalib com.ustadmobile UMCordovaLib
cd umcordovalib
cordova platform add android
cordova build
cd ../androidproject
android update project --target 6 --path ./ustadmobile/ --library
../../umcordovalib/platforms/android/CordovaLib/
Is there any more up to date documentation on this? I did a quick google
but couldn't find anything. If not once I get through this I'd be happy
to contribute a revised version of the documentation.
Thanks/Regards,
- -Mike
- --
Mike Dawson
CEO
Ustad Mobile
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJUs7Y9AAoJEMDbIyechsEfkMAQANDfbXnf6lnFryM30ae6gQ18
htGraR10PYvlzTFJPz10Xbji7RHwRSNRej+g8Fok1tisi7MGhpcp5XAgFEp8kYcS
vqDxqMZTI+PEDP3oGpYDB7z7hX6IGxzaXl7LcbujHh5ATFQST6zJe1JM8aCzZxeB
5IchoYDxIK0LFcmJgc9wAFuFYX8hSwB2/nlnZ72tVbMZo8PNz4268rZcNo0xLjKg
KydBMt6Iq47Mwkqb/wp8Sq4okT3z8emb/aTx3yodzeI0pi/rnbrnVEF2YES7Vr4F
z/BoZWE6PQKfRWjKlK59HaqkwXM+NfTrA+KnSahqFD2hsDb8JIDIUqaj5ESUMD9P
O/3At0EOgHop3FjG2LC432k9yjjeqwt8eD3gnp6CjSBcga+03TKEFhjMQK7ow9Fj
uPF9IbTdgkuNEMb+dqtqMFaKk+B363wN4+fpxTyiSAeVadaIOy45ga8FVl5UHux6
Mgx2P0QB+/rvfLNALm/XrQOFsikVhaJEII7IMZ3IK7IA0FdjI5d78yN8W+mzlS8n
cjPKCi0SHpNATPZUI6QYnFxG+1xWReSh+nh3Nrqc60J4HgsFCSLa4XS6Y5NXzMCu
RyDgf7fbsuS/GjGlTu/5eXqe/f9njYrigP+o4o9GGmXoUuvm33Em/9yArL5dbSP1
cRFsWjo8j04jefDmeQEX
=4hbU
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
Re: Documentation on Android/Cordova Webview
Posted by Mike Dawson <mi...@ustadmobile.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
I've now gotten from a blank command line to having a working testable
project with an embedded Cordova WebView and plugins installing;
1. Use the normal Cordova CLI to create a project
2. Use Android CLI to create a new Android project; set the Cordova CLI
generated project as a library to the new Android Project.
3. Copy Cordova CLI generated project www folder to the android project
4. Use plugman to add/remove plugins within the Android project
5. Create an Android testing project using the Android CLI
Does this sound like the right way to recommend for people using Cordova
embedded for Android? If so I'll put this together as a fork of the
documentation project as per the contribution procedures.
Regards,
- -Mike
On 01/12/2015 08:39 PM, Joe Bowser wrote:
> There is no jar, Cordova is now an Android Library, and it gets included in
> the generated project like how most Android projects work. Using the CLI
> is what people recommend, but you should either use that or the create
> scripts themselves to create your project.
>
> On Mon Jan 12 2015 at 11:35:36 AM Mike Dawson <mi...@ustadmobile.com>
wrote:
>
>>
> Hi,
>
> Many thanks for the info here; perhaps someone from cordova-android can
> specify if using cordova create or download the jar is best practice? I
> can then fork it to update webview.md; check it all the way through and
> then contribute it.
>
> Thanks!
>
> -Mike
>
> On 01/12/2015 08:24 PM, Josh Soref wrote:
> >>> Mike Dawson wrote:
> >>>> I'm looking to build a Hybrid app version and tried following:
> >>>>
> >>>>
> http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md
> >>>> .html#Android%20WebViews
> >>>>
> >>>> I think this might be a bit out of date.
> >>>
> >>> Well, it isn't technically wrong, IMO it could definitely use some
love.
> >>>
> >>>> I am running Cordova 4.2 and
> >>>> compiling with API Level 19; all on Ubuntu 14.10 which is all running
> >>>> fine for normal cordova and android development.
> >>>>
> >>>> The documentation says to unzip the download (whereas the main site
> >>>> recommends the normal installation using npm).
> >>>
> >>>
> >>> 1. To follow these instructions, make sure you have the latest Cordova
> >>> distribution. Download it from cordova.apache.org and unzip its
Android
> >>> package.
> >>>
> >>> Technically this isn't wrong, if you manage to figure out how to
follow
> >>> it, you would end up w/ cordova-android as opposed to cordova-cli.
> >>>
> >>> Personally, I'd favor changing the instructions to use the normal
> `cordova
> >>> create` and `cordova platform add android`...
> >>>
> >>> That said, I don't work on cordova-android.
> >>>
> >>>
> >>>> Is there any more up to date documentation on this?
> >>>
> >>> Probably not
> >>>
> >>>> I did a quick google but couldn't find anything.
> >>>
> >>>> If not once I get through this I'd be happy to contribute a revised
> >>>> version of the documentation.
> >>>
> >>> In general, patches are welcome.
> >>>
> >>>
> https://github.com/apache/cordova-docs/blob/master/docs/
> en/edge/guide/platf
> >>> orms/android/webview.md
> >>>
> >>> Is the file, fork the repository, write replacement content,
> >>>
> >>> Follow the instructions starting from:
> >>> http://wiki.apache.org/cordova/ContributorWorkflow
>
>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
>> For additional commands, e-mail: dev-help@cordova.apache.org
>>
>>
>
- --
Mike Dawson
CEO
Ustad Mobile
Email: mike@ustadmobile.com
Phone: +971 555 99 7043
Web: www.ustadmobile.com
Twitter: @ustadmobile
Facebook: www.facebook.com/Ustad.Mobile
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJUvoB/AAoJEMDbIyechsEfiioP/2J47B8lf/boEqmCW0cotId3
kd6wAs9ov9Kaji3M5wTcOmA5ik/cr99wpuXOg/Xnz8LjwTg+egHPVIKtebW76qv7
e9inC7+52g5nk8Rvctybw+8YT2FmRPQhCaJtXlXGy8ti+6e1Xjld8kiaMLIEHpuB
RreCGY52EneppQbv65V1wttrEr+Z7slDF76wIJIoEqHlqPq71hvdj2LF+yBP8UuN
P4b5EwordPysu4KpjR1fiikGI+w1IQADREcHoZL0c7YwTbrLqtPaq9m/7Ti5As3R
gLuAFr6my2wfJM5yPt/wapk0754lygC2obJ9FLpw1w2HwgIE90KI85dBWUxnzLRj
CciOoJ1CFNXMD5MkFlL81LOmlWEZnIlmbeXLhuYlPGU6NiMVqDGRzYA6g6UPHj1W
zDdN+pnSx6PtGRCsuwL7ajDi6L5c8QU4Pv4eVcJ+9UtqsihAW+bUihhqGXCWhJVW
f/qRNHp2ooykui91kcBJ9OXpRPuUe8W4mJZXzAtVacM4Sf6ESJd20/wj320T3XkP
dj37x3sT9ipRv+/8WFmKdverkM7PEkTtw3FjBhOYpMNsl/GAdvDdIbH2KexkYYuJ
s4yrkDcmxjz0vA5mm2ZH9ZUbkZPrwYzybpow72O1xeKBHWXw8xdss28S0WSg2toG
Y9mZSeVQaadRQhFZn3ou
=6p1B
-----END PGP SIGNATURE-----
Re: Documentation on Android/Cordova Webview
Posted by Joe Bowser <bo...@gmail.com>.
There is no jar, Cordova is now an Android Library, and it gets included in
the generated project like how most Android projects work. Using the CLI
is what people recommend, but you should either use that or the create
scripts themselves to create your project.
On Mon Jan 12 2015 at 11:35:36 AM Mike Dawson <mi...@ustadmobile.com> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Many thanks for the info here; perhaps someone from cordova-android can
> specify if using cordova create or download the jar is best practice? I
> can then fork it to update webview.md; check it all the way through and
> then contribute it.
>
> Thanks!
>
> - -Mike
>
> On 01/12/2015 08:24 PM, Josh Soref wrote:
> > Mike Dawson wrote:
> >> I'm looking to build a Hybrid app version and tried following:
> >>
> >>
> http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md
> >> .html#Android%20WebViews
> >>
> >> I think this might be a bit out of date.
> >
> > Well, it isn't technically wrong, IMO it could definitely use some love.
> >
> >> I am running Cordova 4.2 and
> >> compiling with API Level 19; all on Ubuntu 14.10 which is all running
> >> fine for normal cordova and android development.
> >>
> >> The documentation says to unzip the download (whereas the main site
> >> recommends the normal installation using npm).
> >
> >
> > 1. To follow these instructions, make sure you have the latest Cordova
> > distribution. Download it from cordova.apache.org and unzip its Android
> > package.
> >
> > Technically this isn't wrong, if you manage to figure out how to follow
> > it, you would end up w/ cordova-android as opposed to cordova-cli.
> >
> > Personally, I'd favor changing the instructions to use the normal
> `cordova
> > create` and `cordova platform add android`...
> >
> > That said, I don't work on cordova-android.
> >
> >
> >> Is there any more up to date documentation on this?
> >
> > Probably not
> >
> >> I did a quick google but couldn't find anything.
> >
> >> If not once I get through this I'd be happy to contribute a revised
> >> version of the documentation.
> >
> > In general, patches are welcome.
> >
> >
> https://github.com/apache/cordova-docs/blob/master/docs/
> en/edge/guide/platf
> > orms/android/webview.md
> >
> > Is the file, fork the repository, write replacement content,
> >
> > Follow the instructions starting from:
> > http://wiki.apache.org/cordova/ContributorWorkflow
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQIcBAEBAgAGBQJUtCHnAAoJEMDbIyechsEfiwgQAKtACAlnZWqGgyoSVcT0NUUo
> 8rH1v2I9v0HW4+t9+WPltRP/yEfIoiiazPM6XSF5ZzSpbuR/f6bUP7qw8kUJhB3r
> o+6LTQZEnsDVjLwNTmebwbp9HuZJG8Eu0HWirKuF6Sm21kAU7vD6+0jNeAJnUPfg
> /S9I/kDH8RDcQUwTS/kSy4tj6n6cgvsInXjRpCAmvA4aB/6YxHp3YG2Wa9xUXb51
> q+TDwglNzbdydV+eFW14LMq0YkeU8N0wKdeMl4X8UrRWTbSnd8fHN+Ns5kCXXWoV
> ftwAI/YCu2ZXUeWy0OpMZQBcr8831cQIokfQzYi0d9LxSEOLs+eqxk4jKbO0Xw7n
> 4rudQnetg5/aRf0rznrkWghX/SLPMpCeT4CRqnltgWEF4CDIwL4F4VbCEK9Kvdy6
> RKLc09NW1gENWVSyjsl1W/HPMx1glpsWVkrFqUIP9YLhOVWomn9QBORUAnscj/6U
> gvl+rGf/vZtVozi8u9QboZdahA01haTD0pyJOG6UR6hPSMPyh39QPTWB01sCMR8F
> Q6Kly5H2xYRy3mahJQhTxIotrKQIJlfcP8LuHrNqW+R0Eeu5Wi0K4oPoG/IyzFYZ
> UolmTvEvGM9YIZomYR2+i1qsIcKLJa+SzbJBZeusI7KhtQ5kDpEwuTVFHjjN7+IX
> boszFSubp411bbJWuSHl
> =ysG2
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>
Re: Documentation on Android/Cordova Webview
Posted by Mike Dawson <mi...@ustadmobile.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
Many thanks for the info here; perhaps someone from cordova-android can
specify if using cordova create or download the jar is best practice? I
can then fork it to update webview.md; check it all the way through and
then contribute it.
Thanks!
- -Mike
On 01/12/2015 08:24 PM, Josh Soref wrote:
> Mike Dawson wrote:
>> I'm looking to build a Hybrid app version and tried following:
>>
>>
http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md
>> .html#Android%20WebViews
>>
>> I think this might be a bit out of date.
>
> Well, it isn't technically wrong, IMO it could definitely use some love.
>
>> I am running Cordova 4.2 and
>> compiling with API Level 19; all on Ubuntu 14.10 which is all running
>> fine for normal cordova and android development.
>>
>> The documentation says to unzip the download (whereas the main site
>> recommends the normal installation using npm).
>
>
> 1. To follow these instructions, make sure you have the latest Cordova
> distribution. Download it from cordova.apache.org and unzip its Android
> package.
>
> Technically this isn't wrong, if you manage to figure out how to follow
> it, you would end up w/ cordova-android as opposed to cordova-cli.
>
> Personally, I'd favor changing the instructions to use the normal `cordova
> create` and `cordova platform add android`...
>
> That said, I don't work on cordova-android.
>
>
>> Is there any more up to date documentation on this?
>
> Probably not
>
>> I did a quick google but couldn't find anything.
>
>> If not once I get through this I'd be happy to contribute a revised
>> version of the documentation.
>
> In general, patches are welcome.
>
>
https://github.com/apache/cordova-docs/blob/master/docs/en/edge/guide/platf
> orms/android/webview.md
>
> Is the file, fork the repository, write replacement content,
>
> Follow the instructions starting from:
> http://wiki.apache.org/cordova/ContributorWorkflow
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJUtCHnAAoJEMDbIyechsEfiwgQAKtACAlnZWqGgyoSVcT0NUUo
8rH1v2I9v0HW4+t9+WPltRP/yEfIoiiazPM6XSF5ZzSpbuR/f6bUP7qw8kUJhB3r
o+6LTQZEnsDVjLwNTmebwbp9HuZJG8Eu0HWirKuF6Sm21kAU7vD6+0jNeAJnUPfg
/S9I/kDH8RDcQUwTS/kSy4tj6n6cgvsInXjRpCAmvA4aB/6YxHp3YG2Wa9xUXb51
q+TDwglNzbdydV+eFW14LMq0YkeU8N0wKdeMl4X8UrRWTbSnd8fHN+Ns5kCXXWoV
ftwAI/YCu2ZXUeWy0OpMZQBcr8831cQIokfQzYi0d9LxSEOLs+eqxk4jKbO0Xw7n
4rudQnetg5/aRf0rznrkWghX/SLPMpCeT4CRqnltgWEF4CDIwL4F4VbCEK9Kvdy6
RKLc09NW1gENWVSyjsl1W/HPMx1glpsWVkrFqUIP9YLhOVWomn9QBORUAnscj/6U
gvl+rGf/vZtVozi8u9QboZdahA01haTD0pyJOG6UR6hPSMPyh39QPTWB01sCMR8F
Q6Kly5H2xYRy3mahJQhTxIotrKQIJlfcP8LuHrNqW+R0Eeu5Wi0K4oPoG/IyzFYZ
UolmTvEvGM9YIZomYR2+i1qsIcKLJa+SzbJBZeusI7KhtQ5kDpEwuTVFHjjN7+IX
boszFSubp411bbJWuSHl
=ysG2
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
Re: Documentation on Android/Cordova Webview
Posted by Josh Soref <js...@blackberry.com>.
Mike Dawson wrote:
>I'm looking to build a Hybrid app version and tried following:
>
>http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md
>.html#Android%20WebViews
>
>I think this might be a bit out of date.
Well, it isn't technically wrong, IMO it could definitely use some love.
>I am running Cordova 4.2 and
>compiling with API Level 19; all on Ubuntu 14.10 which is all running
>fine for normal cordova and android development.
>
>The documentation says to unzip the download (whereas the main site
>recommends the normal installation using npm).
1. To follow these instructions, make sure you have the latest Cordova
distribution. Download it from cordova.apache.org and unzip its Android
package.
Technically this isn't wrong, if you manage to figure out how to follow
it, you would end up w/ cordova-android as opposed to cordova-cli.
Personally, I'd favor changing the instructions to use the normal `cordova
create` and `cordova platform add android`...
That said, I don't work on cordova-android.
>Is there any more up to date documentation on this?
Probably not
> I did a quick google but couldn't find anything.
>If not once I get through this I'd be happy to contribute a revised
>version of the documentation.
In general, patches are welcome.
https://github.com/apache/cordova-docs/blob/master/docs/en/edge/guide/platf
orms/android/webview.md
Is the file, fork the repository, write replacement content,
Follow the instructions starting from:
http://wiki.apache.org/cordova/ContributorWorkflow
Re: Documentation on Android/Cordova Webview
Posted by julio cesar sanchez <jc...@gmail.com>.
If you unzip this, you have the framework directory
https://www.apache.org/dist/cordova/platforms/cordova-android-3.6.4.tgz
2015-01-12 12:55 GMT+01:00 Mike Dawson <mi...@ustadmobile.com>:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Cordova Dev List,
>
> I'm looking to build a Hybrid app version and tried following:
>
>
> http://cordova.apache.org/docs/en/4.0.0/guide_platforms_android_webview.md.html#Android%20WebViews
>
> I think this might be a bit out of date. I am running Cordova 4.2 and
> compiling with API Level 19; all on Ubuntu 14.10 which is all running
> fine for normal cordova and android development.
>
> The documentation says to unzip the download (whereas the main site
> recommends the normal installation using npm). It then says to go to
> the android package framework directory. There is no such framework
> directory either in a created project or in
> /usr/local/lib/node_modules/cordova or in a newly created cordova
> project with the android platform added.
>
> What does seem to work is to create a blank cordova project; add
> android, and then use the CordovaLib project generated as a library for
> another native android project; e.g.
>
> #native android project here
> mkdir androidproject
> cd androidproject
> android create project --target 6 --name UstadMobile --path
> ./ustadmobile --activity UstadMobile --package com.toughra.ustadmobile
>
> cd ..
>
> cordova create umcordovalib com.ustadmobile UMCordovaLib
> cd umcordovalib
> cordova platform add android
> cordova build
>
> cd ../androidproject
> android update project --target 6 --path ./ustadmobile/ --library
> ../../umcordovalib/platforms/android/CordovaLib/
>
> Is there any more up to date documentation on this? I did a quick google
> but couldn't find anything. If not once I get through this I'd be happy
> to contribute a revised version of the documentation.
>
> Thanks/Regards,
>
> - -Mike
>
> - --
> Mike Dawson
> CEO
> Ustad Mobile
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
>
> iQIcBAEBAgAGBQJUs7Y9AAoJEMDbIyechsEfkMAQANDfbXnf6lnFryM30ae6gQ18
> htGraR10PYvlzTFJPz10Xbji7RHwRSNRej+g8Fok1tisi7MGhpcp5XAgFEp8kYcS
> vqDxqMZTI+PEDP3oGpYDB7z7hX6IGxzaXl7LcbujHh5ATFQST6zJe1JM8aCzZxeB
> 5IchoYDxIK0LFcmJgc9wAFuFYX8hSwB2/nlnZ72tVbMZo8PNz4268rZcNo0xLjKg
> KydBMt6Iq47Mwkqb/wp8Sq4okT3z8emb/aTx3yodzeI0pi/rnbrnVEF2YES7Vr4F
> z/BoZWE6PQKfRWjKlK59HaqkwXM+NfTrA+KnSahqFD2hsDb8JIDIUqaj5ESUMD9P
> O/3At0EOgHop3FjG2LC432k9yjjeqwt8eD3gnp6CjSBcga+03TKEFhjMQK7ow9Fj
> uPF9IbTdgkuNEMb+dqtqMFaKk+B363wN4+fpxTyiSAeVadaIOy45ga8FVl5UHux6
> Mgx2P0QB+/rvfLNALm/XrQOFsikVhaJEII7IMZ3IK7IA0FdjI5d78yN8W+mzlS8n
> cjPKCi0SHpNATPZUI6QYnFxG+1xWReSh+nh3Nrqc60J4HgsFCSLa4XS6Y5NXzMCu
> RyDgf7fbsuS/GjGlTu/5eXqe/f9njYrigP+o4o9GGmXoUuvm33Em/9yArL5dbSP1
> cRFsWjo8j04jefDmeQEX
> =4hbU
> -----END PGP SIGNATURE-----
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>