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.
Any advice would be appreciated.
Last Visit: 31-Dec-99 19:00 Last Update: 10-Dec-23 16:46