Hello there. I have written a code for 10" tablet with resolution of 2560 x 1600 and hardcoded values for it. The functionality is simple. I simply check whether current point on picture, in OnTouch event, lies in particular polygon or not. It works fine.
But the problem is, I have hardcoded values and now I am given a 7" tablet with resolution of 1200 x 1920. And my code does not work for it because of changed resolution. How do I handle this? I don't want to hardcode another set of values for 7" tablet. Thanks
NOTE: Picture resolution remains same 1500 x 1501 pixels.
But you can do one thing: Create an Android app with a WebView control, and then load your jQuery mobile project as a website in it. Make sure you are having all the HTML, and other files that you would be loading in the mobile project.
That is exactly what most cross-platform HTML frameworks support during mobile development, to run a website in a WebView.
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?