Downloading source programatically from github for phonegap - android

I am new to this forum so please forgive me if I am asking something stupid.
I have a mobile responsive website which is to be ported on mobile devices using PhoneGap. The code of mobile site is on github and I want to download the code from github in order to work in offline mode. This would help in keeping just one version of application on play store which will download content from github if there are any changes on website.
So, is there anyway I can download zip file from github using android APIs?
Thanks for reading.
Regards,
Anjali

This is very much possible. Please see at the link below.
How to download source in ZIP format from GitHub?
You need to use HttpURLConnection in order to download it to the location you want.
Cheers,
Bsengar

The link for the actual zip file is available on GitHub.
It's possible to download a zip file using the HttpURLConnection. You should cache the zip(on SD card for example), and extract it. The code for downloading the zip is shown in this thread:
Android Download Zip to SD card?

Related

APK is downloaded as ZIP on some phones

I'm facing an issue where in some android phones my .apk file is downloaded as .zip. I run a android game which can be downloaded from my website. I have created my website using wordpress Ocean WP theme with the help of elementor. What could be the reason for this. I tried modify the htaccess file in public.html folder but that's not working instead it stop access to my other website pages. Please let me know if any one knows the reason for this. Thanks

How to open documents located in Local Storage in android using WebView?

I have a doc/ppt/xls file located in my sd card. I want to open it without any third party app (i.e within my app itself) using webview. Though I am able to open documents by embedding it in google docs url like -
http://docs.google.com/gview?embedded=true&url=[filelinkHere]
But how to open a file located in internal or external storage in webview ?
Also, Suggest me any third party ALL-IN-ONE library for android to view all types of documents. I have tried ASPOS but it has few unresolved bugs and APACHE-POI is difficult to use.
I had the same issue few days ago .
i found Android PdfViewer best to view PDF files and Android PdfMyXml best to create pdf files in android.
For working with Word and Excel as a most reliable answer I suggest you to take a look at OliveDocLibrary .
If your documents are in cloud so there is an alternative way to display docx,pptx,pdf and such formats with a combination of Webview and googleDoc.
You might find other possible solutions in server-side machines or maybe a creative way!
Hope it help
You can integrate some library project to your project with which you can open the pdf file inside your app.
Reference :
https://github.com/tekinarslan/AndroidPdfViewer
https://github.com/JoanZapata/android-pdfview

Upload and download file to Amazon from android application

I want to upload file to amazon from my android application.
I have downloaded AWS SDK and added to build path of my project.
Now i want to upload file to my bucket.which is already created.
SO how can i upload file, i am not getting any proper solution to it.
Please help and provide your suggestions.
Thanks in advance
I suggest taking a look at our Getting Started Guide for S3 and looking into the TransferManager which is meant as a high level utility for easily handling uploads/downloads
http://docs.aws.amazon.com/mobile/sdkforandroid/developerguide/s3transfermanager.html

How to upload file to dropbox from url?

I can find lots of tutorials and examples on how to upload a file from sdcard to dropbox account. But how can I upload a file that is not in sdcard and all I have is url? I don't want to download it and then upload it, because file is like 400MB size.
Save Web Files (http://ctrlq.org/save/) can do it. (just visit the website on your android)
Dropbox has implemented this as a native API call: https://blogs.dropbox.com/developers/2015/06/programmatically-saving-a-url-to-dropbox/
This is currently being re-implemented by DBinbox.com to be more user-friendly :)

How to get http url of downloaded file in android?

I am trying to find a way to get http-url of downloaded file in android. Is there anyway to do it ?
I have looked around DownloadManager, but it seems not appropriate for this scenario.
e.g. if we open browser with link : http://www.xyz.com/myapp.apk?param1=abc
and now after downloading and installing apk.
In same application (when it starts) I need to get -> param1=abc.
Any kind of help will be appreciated!
Thanks
Personnaly, I think that the downloaded url is not stored in the .apk file. The apk file is a portable file and can be downloaded from different url addresses and the web browser will not add a metadata to the apk file.

Categories

Resources