Im mobile optimising a website with media queries. Without any extra markup the phone numbers seems to be recognised and become 'clickable' on iphones and android, but my windows phone emulator only recognises the 2nd 1/2 of one the numbers.
This method doesnt work on opera mobile:
1234
http://developer.apple.com/library/safari/#codinghowtos/Mobile/UserExperience/_index.html
This method makes the link clickable in desktop browsers, even if the browser doesn't know how to handle the number:
<a href=”#” tel=”1234”>1234</a>
http://www.wpromote.com/blog/google/optimizing-your-web-site-for-mobile-3-easy-tips/
So whats the best solution or trade off for markup around phone numbers? Thanks
The first example (tel:) is an RFC standard: http://www.ietf.org/rfc/rfc3966.txt and, as far as I know, there is no "tel" attribute, so i would prefer the tel-URI.
Related
I am building an Angular test preparation app (with Laravel 5.1 API). One of the requirements is to allow the user to print a certificate of achievement.
The client wants the person's name and credentials interpolated into the document (e.g., highlighted below). Here is a snapshot of the PDF template they sent:
The way I'm handling PDF viewing is simply by storing the file on S3 and giving them a link to that file.
Interpolating information into a PDF doc doesn't seem trivial and I haven't found much information on programmatically allowing this, but there are tools like DocHub, that allow you do edit while viewing the PDF.
I'm interested in learning:
is doing this programmatically trivial?
are there 3rd party tools I'm unaware of?
would I even be able to send this information along to the S3 link to interpolate in the first place?
Using PDF as a format for editing is usually a bad choice. If you have a form with fixed fields, then it's easy. Create a PDF template with an interactive form. In this form, based on AcroForm technology, you'll define fields with fixed coordinates, and a fixed size. You can then add content to these fields.
One major disadvantage with this approach is the lack of flexibility. Did you notice that I used the word "fixed" three times in the previous paragraph? If text doesn't fit the predefined field, you're out of luck. If the field is overdimensioned, you'll end up with plenty of white space. This approach is great if you can predict what the data will be like. A typical use case is a ticket or a voucher. For instance: the empty form is a really nice page, with only a couple of fields where an automated system can put a name, a date, a time, and a seat number.
This isn't the best approach for the example you show in your screen shot. The position of every line of text, every word, every character is known in advance. If you want to replace a short word with a long word (or vice-versa), then all those positions (of each line, of the complete page, possibly of the complete document) need to be recalculated. That's madness. Only people with very poor design skills come up with such an idea.
A better idea, is to store the template as HTML. See for instance chapter 5 of iText's pdfHTML tutorial, where we have this snippet of HTML:
<html>
<head>
<title>Invitation to SXSW 2018</title>
</head>
<body>
<u><b>Re: Invitation</b></u>
<br>
<p>Dear <name>SXSW visitor</name>,
we hope you had a great SXSW film festival experience last year.
And we would like to invite you to the next edition of SXSW Film
that takes place from March 9 until March 17, 2018.</p>
<p>Sincerely,<br>
The SXSW crew<br>
<date>August 4, 2017</date></p>
</body>
</html>
Actually, it's not really HTML, because the <name> tag and the <date> tag don't exist in HTML. All HTML processors (browsers as well as pdfHTML) ignore those tags and treat their content as if the tag was a <span>:
It doesn't make much sense to have such tags in the context of pure HTML, but it does make a lot of sense in the case of pdfHTML. With pdfHTMLL, you can configure custom tags, and have a result that looks like the PDFs shown below:
Look at the document for "John Doe" and compare it with the document for "Bruno Lowagie". The name "John Doe" is much shorter than my name, hence more words fit on that first line. The text flows nicely (we could also have chosen to justify the text on both sides). This "flow" is impossible to achieve with your approach, because you will never get a PDF template to reflow nicely.
OK, I get it, you probably say, but what about the practical aspects? You talk about a Java / .Net library, but I am working with Laravel and Angular.js. First, let me tell you that I don't think you'll find any good PDF tools for Laravel or Angular.js, because of the nature of PDF and those development environments (in my opinion, those technologies don't play well together). Regardless of my opinion, this shouldn't be much of a problem for you because you work in an Amazon environment. AWS supports Java, and the Java code needed to get pdfHTML working is minimal. Most of the code samples I wrote for the pdfHTML tutorial are shorter than 15 lines. So why not try Java and pdfHTML?
If you're already using Amazon services, why not use an amazon lambda function, in combination with iText7 (java), to generate the pdf on demand?
That way, you are guaranteed that the pdf is correct, and has nice layout every time.
Generating the pdf can either be done by:
converting HTML,
programmatically creating your entire document,
filling and flattening an XFA form.
I think for your use-case, either option 1 or 2 are the most sustainable.
We received a complaint that some visitors to our website are dialing the wrong number to get in contact with us.
Our website has a hyperlink in the following form in the footer:
Call us at 12345678
Note that the "+47" (international code) is NOT displayed visually, it is only included in the hyperlink. But now it turns out a limited number of people (circa one a day) is actually calling a private local number at 47123456. Not many considering the size of our business, but still a major nuisance for the family receiving these calls.
The people calling say they just pressed the link to dial.
Has anybody else had these problems? Is anybody aware of mobile phones that do not properly support the tel hyperlink? Any suggestions for a solution? (Apart from changing our or their phone number, of course.)
There are different ways smart phones pick a telephone number.
some are reading the text of your website - some use the tag
on my first try: I would add the +47 to the displayed telephone number
on my second try (or both together): I would replace +47 with 0047 (its norway - or?)
and before posting i got a third idea: which encoding has the webserver and which encoding has the html / PHP page in sourcecode? Both UTF-8 or something else?
Maybe your server is sending it in a different way than the website is created and somehow some smartphones can't handle it correctly.
The problem here is pretty simple: this is the URL-Encoding.
The + char is an reserved character within the URL and represents an space.
To get an actual + sign replace it with the URL encoded version: %2B
See Links for details:
Wikipedia
W3Scools
I'm trying to setup a credit card entry field, and I need to be able to separate the digit-groups with a space. But on a mobile device, I want the number keyboard to appear, so I'm using input[type="number"] instead of just input[type="text"].
Currently, when I test on Chrome it's working. The $viewValue appearing in the directive for the credit card field shows the 16-digit number (Angular even auto-removes the spaces because of number type field).
But in Firefox, as soon as you type a space, $viewValue returns as "" (even though the field value is "5555 5555 5555 4444").
Is there any way to make this work as expected?
Wow Maybe this a serious Mozilla Bug, with no solution for now, then you may apply other ways to resolve this.
Use mask (lose number on mobile): Try Plugins, library like this http://digitalbush.com/projects/masked-input-plugin/ , the bad user loses the PAD NUMBER on mobile devices.
To keep input number (complex only for fun): Make a input type hidden, then when the user type on number field, fill the hidden input with the value.
Use text field (best way): yes number is the new era on HTML5, but users don't care that for now, yeah show only numbers with the pad (like most apps) is awesome, now ask is really necesary?
Dynamic Form JS: verify the browser version, if Wild Mozilla appears, change type number to type text ;)
Good luck !!
best regards from http://elporfirio.com
I have been working on a call recorder app which is working fine on MEDIATEK(XOLO, Micromax etc) phones and Sony Xperia SP.
But Samsung is giving me nightmares. I have tried two samsung phones specifically Galaxy Tab2 and one I don't remember name of(let me know if you want to know).
Can anyone tell what settings are needed for Samsung. I have used these:
mRecorder = new MediaRecorder();
mRecorder.setAudioSource(AudioSource.VOICE_COMMUNICATION);
mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);
mRecorder.setOutputFile(outputFile);
I have tried almost all the combinations of every audio source VOICE_COMMUNICATION, VOICE_CALL, DEFAULT, MIC etc with every audio format and every audio encoder namely 3gpp, mp4, AMR_NB, AMR_WB etc.
I have read many forums regarding this problem but most of them are either unsatisfactory or too old to consider.
today's question is about the use of textfields in J2ME Polish for Symbian^3 devices.
In my code I have something like this:
TextField digitValueText = new TextField ("Number", "", 1, TextField.NUMERIC);
This works perfectly fine on other symbian devices (s40, s60, etc), however, when I go and test it on a Nokia N8 (Symbian^3) I can't input numbers, nor does the device allow me to select the textfield to popup the keyboard.
Has anyone else gone through this problem?
the textField has to be numbers-only since we don't want the users to input text (it's for authentication).
Thanks in advance!
EDIT: So it seems that this behavior is from polish.TextField.useDirectInput, TextField.NUMERIC inherits the behavior by default...
still any ideas on this?
Change the project configuration to Generic/AnyPhone.