Page 1 of 1

Why don't download buttons in website not work when viewed from the window within the app on android?

Posted: Fri Mar 21, 2014 6:57 pm
by Danny -

Hey guys,

I have a mobile responsive website. I created a simple app with some links to the pages of this mobile responsive site. It opens the links in the same window. This is desired. I can login successfully and access areas of the site that are restricted just fine.

My problem is that when i click a button designed to download a file, it does not work at all as it usually does when clicked from any normal desktop or mobile browser. The download button link is references a link such as http://dev.millardccp.com/online-edit... . The apps permissions are set to allow read/write, etc. But for this, i could actually use the app just great. I tested via apk for android on google nexus 7.

Thanks :)


Why don't download buttons in website not work when viewed from the window within the app on android?

Posted: Fri Mar 21, 2014 7:35 pm
by Maryna Brodina

Hello!

You open your site inside WebView, thus there won't download as in desktop browser.


Why don't download buttons in website not work when viewed from the window within the app on android?

Posted: Fri Mar 21, 2014 7:42 pm
by Danny -

any way to make it download? :)


Why don't download buttons in website not work when viewed from the window within the app on android?

Posted: Fri Mar 21, 2014 8:16 pm
by Danny -

Thanks for the keyword tip. found this link that might be helpful. I'm attempting to modify it to just go ahead and open a link in the inappbrowser

http://docs.appery.io/tutorials/using...

danny :)


Why don't download buttons in website not work when viewed from the window within the app on android?

Posted: Fri Mar 21, 2014 8:35 pm
by Danny -

ok, so i got the links opening.

the _self link method has the look i like with full screen view of site; but downloads not working.

the _blank method does open using the inappbrowser with the controls at the top and the url of the website; however download button still not working

the _system method works great, but of course it just opens the system browser which already works with downloads - but not what i needed (want basically an app that just opens the website with no controls; full screen - and downloads work.)

Is there a way to get the website link to open using the _self method and WebView but have the full functionality of the normal android system browser? Perhaps by including a missing js library perhaps? My website should have the necessary js files in the head. Could it be that the references are relative links to js files in my website header instead of absolute paths?

Thanks :)


Why don't download buttons in website not work when viewed from the window within the app on android?

Posted: Fri Mar 21, 2014 8:52 pm
by Danny -

ok, found this :) google developer site says that the ability to use javascript from a webpage displayed using WebView is off by default. they said you can turn it on with this code in the activity layout. How might this be turned on within appery's system? Might this be the reason download button doesn't work in WebView or InAppBrowser?

http://developer.android.com/guide/we...


Why don't download buttons in website not work when viewed from the window within the app on android?

Posted: Fri Mar 21, 2014 9:42 pm
by Maryna Brodina

JS is not the issue, it's included in PhoneGap app. You don't need to navigate to site, you need to show content inside app then you will be able to download anything with PhoneGap http://cordova.apache.org/docs/en/3.0...