I try to create a simple android mobile app. Using Eclips, I just use WebView control and target that control to a mobile web form/web page (by using loadUrl) which is asp.net page.
On asp page I try to create a pdf and try to open/download. I successfully create the pdf file. But fail to open that file in separate window (adobe reader) and also I am unable to download that file in device.
Please give some solution to open pdf in separate window (outside mobile app) or download the pdf file from server to local device.
Thanks in advance.
What I have tried:
//On my mobile app I use:
String url = "http://example.com/testprint.aspx";
//On testprint.aspx I use:
<html xmlns="w3.org/1999/xhtml"; > <body>
<mobile:Form id="Form1" runat="server">
<mobile:Command ID="Command1" Runat="server" OnClick="Command1_Click">Command</mobile:Command></mobile:Form></body></html>//On testprint.aspx.cs I use: string FilePath = Request.PhysicalApplicationPath + "\\MyPDF\\test.pdf";
//I write a method here to create pdf file /*.......*///After that I write this code for open that file (which I create above)
Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment; filename=test.pdf");
//I also try to use below method also to download the filestring FilePath = Request.PhysicalApplicationPath + "\\MyPDF\\test.pdf";
Response.ContentType = "application/octet-stream";
Response.AppendHeader("Content-Disposition", "attachment; filename=" + Path.GetFileName(_Path));
constint _bufferLength = 10000;
byte _buffer = new Byte[_bufferLength];
int _length = 0;
Stream _download = null;
_download = new FileStream(_Path, FileMode.Open, FileAccess.Read);
_length = _download.Read(_buffer, 0, _bufferLength);
Response.OutputStream.Write(_buffer, 0, _length);
_buffer = new Byte[_bufferLength];
_length = -1;
while (_length > 0);
if (_download != null) _download.Close();
Yes, the same issue I post there, but not getting any response. However, when I run that page directly on browser, it working fine. But when same page using on webview it do nothing. Is any permission require?
You may think this a stupid answer, but obviously one that is big enough to contain whatever it is you want to put on it. You can look at the distribution size on the eclipse website, or wherever it is installed on your PC.
I have been researching this for a week and would like some more advice from someone who has experience.
My requirements are:
1. Easy to learn
2. Easy to debug
3. Free tutorials (and plenty to choose from)
4. Free implementation. (no paid services)
My app is going to teach language, and have some simple quizzes with pictures and mp3 sounds.
Because the quizzes will need to shuffle words around, a table- style database would suit best.
This means SQLite or MySQL database rather than JSON.
From what I can tell, probably the best language to communicate with SQL type databases is SQL.
Although it's not the easiest language to learn, there are plenty of free tutorials I can find.
Another alternative that looks attractive is web2py, because it seems geared to suit my project, and might be faster, however, it's less widely used and less teaching material is available, so I might get stuck.
Kotlin looks like a wonderful language to learn, but there are very few free tutorials.
Java seems unintuitive to me and I would prefer to avoid it.
I know that Java is the official language for Android, but from what I can tell, it’s not the easiest to learn for beginners or the most suitable for database heavy apps.
I won’t be needing to access any of the Android phone features, like camera/GPS etc.
I have tried to grasp Java already and found it very difficult.
I am hoping that there are alternatives to learning Java.
Could you please recommend:
1. Which language to learn,
2. What code editor is suitable for beginner (especially debugging),
3. What database GUI would be easy to use for this kind of project.
4. Any other software that would help.
I would recommend Android Studio, but it requires Java (which, with very few exceptions, I find easy to read and understand). If I had the time, I would try a few projects with using C#, C++, or maybe Kotlin.
researching this for a week
1. Easy to learn
Although it's not the easiest language to learn,
it's less widely used and less teaching material is available, so I might get stuck.
but there are very few free tutorials.
it’s not the easiest to learn for beginners
found it very difficult.
I am hoping that there are alternatives
2. What code editor is suitable for beginner
I started on this journey nearly 30 years ago, long before the web and its endless supply of free stuff existed in its current format. There were no tutorials, gift-wrapped code, teaching materials, or code made to order. On occasion, you might could find some chatter on a Usenet group, but those took a long time to navigate and replies weren't imminent. Instead, everything that you needed had to come from your own hands, or at the very least, a trip to the library or book store. The concept of easy and difficult did not exist; you did what was required to get the job done. That might've taken months, but at the end of that, you had so much time invested, you were the de facto expert.
Alas, I'm a crock pot living in a microwave society.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
Last Visit: 31-Dec-99 18:00 Last Update: 30-Sep-22 2:01