-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I build an android custom app for offline deployment #66
Comments
After studying this a bit it looks to me like building on travis is a good approach if we could have some additional parameters: --embed_zim (default false and take from json in if not supplied) and something to allow the built apk to be uploaded somewhere other than google play store, say with scp. This might well require a private key to be supplied as well. I would rather not have to fork kiwix-build in order to override https://github.com/kiwix/kiwix-build/blob/master/travis/deploy_apk.sh ideas? |
Hum... The functionality is not supported as an easy to use option. This is a bit complex for now and there is a lot of commands that will be not necessary to do once everything will be integrated in Clone the kiwix-android-custom repository using kiwix-build.The easy way to do it is to launch : Use the patch for kiwix-androidBe sure to use the path from this PR : kiwix/kiwix-android#257 Create your own directory and info.json for you customappThe source of kiwix-android-custom will be in the Set the variables
|
About your last comment I've missed (build on Travis) :
|
Thanks for all this information. Since using kiwix-build needs a patch from kiwix-android, when do I use kiwix-build and when do I use kiwix-android? Which represents the future? |
In terms of using travis, I am now thinking I need to create my own repo with a modified android-custom-app.py which launches on my repo (with my credentials) but then clones kiwix-build to do the work and uses a modified deploy_apk.sh to upload the file to a server. I'd rather not have to continually patch a forked kiwix-build. |
If there are planned changes to this whole workflow that you can share, I would work towards them. |
kiwix-build is just a set of scripts ( You can use directly kiwix-android build system with gradle (and script in kiwix-android-custom, and build-system of kiwix-lib and dependencies, and ...) or use kiwix-build and don't care of the option to pass to those (sub) build-systems. Both are the future. They will evolve in parallel. All those operation are a bit complex because they are not integrated in kiwix-build scripts. But at the end, kiwix-build will just run those commands for you. |
Patch for kiwix-android has been merged. |
As long as kiwix/kiwix-android#56 is not properly fixed, Kiwix does not encouraged to use this kind of APK because the installation process might simply die on low-end devices and that is why the documentation is not ready and also why we do not provide directly the APKs at http://download.kiwix.org/ |
Hi @mgautierfr Thanks for the instructions, they are very helpful. I followed them and got much further on the compilation but it still failed with a I modified I also tried modifying
but it didn't make a difference. This what I am doing:
The extract of the error is:
|
You can see the full output log in the attached file. output.txt |
@nataren, That's strange. It's gradle failing because of some kind of missing heap space. Maybe @mhutti1 can help. He knows the gradle build system better than me. |
Creating the file`~/.gradle/gradle.properties with the heap size that I can spare worked for me:
The build succeeded and I got several apk's at
I tried installing |
@nataren Is your architecture right? If so can you share the apk? |
For the "release-unsigned" APKs, I just want to remind that ticket kiwix/kiwix-android#151 |
The phone's arch is |
@nataren can you try the debug version then? |
The debug version can be installed but it fails to launch. |
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
1 similar comment
This issue has been automatically marked as stale because it has not had recent activity. It will be now be reviewed manually. Thank you for your contributions. |
@MohitMaliDeveloper I believe moving to bundle has changed many things. Would we be able to provide a bundled app in a form of one file which could be sideloaded? |
Users who have no internet connection can not get to the Google playstore, so Internet in a Box provides kiwix apks with embedded zims that can be loaded to an android phone directly from the server. In previous versions of the custom app builder the json file could be passed as an argument and this json file could have embed_zim: true. It could also have other parameters set to custom values. It looks like this is no longer supported.
The two wiki pages for this repo describe building apks for the Google playstore either with Travis or without using the json files in https://github.com/kiwix/kiwix-android-custom, all of which have embed_zim false.
What are the parameters to pass to build_custom_app.py to get an embedded zim, either built locally or built on Travis for upload to a public site or for download and not to upload to Google? Or is there an alternate method of obtaining an apk with embedded zim?
The text was updated successfully, but these errors were encountered: