D darkuni Member Licensed User Longtime User Feb 9, 2012 #1 Hey gang .. I need to direct my app to open a PDF stored on the web. I can instantiate a browser and pass the URL - but that is really an extra step I'm hoping to avoid. Is there a way I can pass the "default" PDF app the address and have it pick it up? I COULD byte stream it down ... then could I "shell execute" the thing like in Windows? Thanks for any help.
Hey gang .. I need to direct my app to open a PDF stored on the web. I can instantiate a browser and pass the URL - but that is really an extra step I'm hoping to avoid. Is there a way I can pass the "default" PDF app the address and have it pick it up? I COULD byte stream it down ... then could I "shell execute" the thing like in Windows? Thanks for any help.
Erel B4X founder Staff member Licensed User Longtime User Feb 12, 2012 #2 Is there a way I can pass the "default" PDF app the address and have it pick it up? Click to expand... There is no built-in pdf reader in Android. I recommend you to download the file, store it in the external storage and start the default reader. Upvote 0
Is there a way I can pass the "default" PDF app the address and have it pick it up? Click to expand... There is no built-in pdf reader in Android. I recommend you to download the file, store it in the external storage and start the default reader.
D darkuni Member Licensed User Longtime User Feb 13, 2012 #3 Thanks for the reply. I understand there is no "innate" app within Android, but my customers will have *A* PDF reader installed and likely already have a Default Action for .PDF files. With THAT assumption I was just hoping I could stream the file down locally, store as a local file, then "invoke" the PDF - much like you would use a shell in Windows - allowing the OS to "take the reins" and either open their default action, or pop up the CHOOSE box for any compatible app. What I'm looking to AVOID is: spawning the browser to download, then forcing them to pull the notification shade and tap the downloaded file. The least interactions possible is the best. Thanks again for all the help. You are a one man machine Erel! Erel said: There is no built-in pdf reader in Android. I recommend you to download the file, store it in the external storage and start the default reader. Click to expand... Upvote 0
Thanks for the reply. I understand there is no "innate" app within Android, but my customers will have *A* PDF reader installed and likely already have a Default Action for .PDF files. With THAT assumption I was just hoping I could stream the file down locally, store as a local file, then "invoke" the PDF - much like you would use a shell in Windows - allowing the OS to "take the reins" and either open their default action, or pop up the CHOOSE box for any compatible app. What I'm looking to AVOID is: spawning the browser to download, then forcing them to pull the notification shade and tap the downloaded file. The least interactions possible is the best. Thanks again for all the help. You are a one man machine Erel! Erel said: There is no built-in pdf reader in Android. I recommend you to download the file, store it in the external storage and start the default reader. Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Feb 14, 2012 #4 Why not download the file yourself with HttpUtils? Upvote 0
D darkuni Member Licensed User Longtime User Feb 14, 2012 #5 Erel said: Why not download the file yourself with HttpUtils? Click to expand... Right, then how do I spawn it without user intervention? That's the piece I'm missing Upvote 0
Erel said: Why not download the file yourself with HttpUtils? Click to expand... Right, then how do I spawn it without user intervention? That's the piece I'm missing
A admac231 Active Member Licensed User Longtime User Feb 15, 2012 #6 The first example here: http://www.b4x.com/forum/basic4andr...known-android-intents-do-stuff.html#post54417 Upvote 0
The first example here: http://www.b4x.com/forum/basic4andr...known-android-intents-do-stuff.html#post54417
Erel B4X founder Staff member Licensed User Longtime User Feb 15, 2012 #7 Right, then how do I spawn it without user intervention? Click to expand... Not sure what you mean. HttpUtils is not related to WebView. Basic4android Search: HttpUtils Upvote 0
Right, then how do I spawn it without user intervention? Click to expand... Not sure what you mean. HttpUtils is not related to WebView. Basic4android Search: HttpUtils