Avoid URL in text message - url

We have a database logic, which sends text messages to phone numbers using webservice. Part of the messages is the string "X.net", which is a brand name. However in the telephones when the message is received this gets transformed into an URL and gets blue letters and gets underlined (because of the ".net"). We would like to avoid this, and instead present this as a simple text. Is there any possibility to do this, and if yes, how?

Related

iMessage identifiers converted to phone number instead of name

I’m developing an Messages extension. When it comes time to send a message, I want it to show up as something like: “Jeff sent a message.”
However, the MSConversation APIs only give us identifiers. When you use these identifiers in the MSMessage layout, it’s supposed to convert them to a name. When I attempt to do this, I see that it does indeed convert the identifier, but it converts it to the phone number of the participant rather than their name.
In other words, the following:
layout.caption = "$\(uuidOfTheParticipant) sent a message"
Shows up as “+15555551234 sent a message”. I’d like it to show a name instead of the phone number.
I searched the documentation to verify that this should be the behavior. I found out it was documented in the WWDC 2016 session 224 video. This was called “iMessage Apps and Stickers Part 2”. The video has been taken down since, so I had to rely on this transcript, where it states:
similarly, you can use these identifiers in the text passed to the Messages sumamaryText. When Messages displays the UI for the bubbles with this type of formatting in their text, it will replace the identifiers with the contact name of the person that their identifier maps to.
In both cases, it sounds like the name of the participant should be showing up rather than their phone number.
I tried updating my contact’s number to look exactly like the one that’s being output (I.e. “+1” in front), but it’s still showing the phone number rather than the name.
Does the API no longer show names, or am I doing something wrong?

Get Last Email Content From Graph Message

I am wanting to get just the most recent message from an email using Graph. So I don't want the whole email chain, just the body or text content of the most recent email. Is this possible without HTML parsing?
thanks
If you use the UniqueBody property https://learn.microsoft.com/en-au/graph/api/resources/message?view=graph-rest-1.0 that should contain what your after eg
https://graph.microsoft.com/v1.0/me/messages?select=subject,receivedDateTime,conversationid,uniquebody

How to find content type of qr code in ios in swift?

I am developing an iOS application where I am scanning QRCode and showing result to user. I am scanning QRCode by native libraries provided by Apple. I am able to get string/content from QRCode but I am unable to distinguish and parse string/content. I want to get the type of data (distinguish data type) present in QRCode as it may have different types of data, for example url, text, mcard, email data. I also want to parse content i.e. getting fields of data, for example in case of email data, I want to get email, cc, subject and body field. This question How are different content types within QR-Codes distinguished? did not helped because it does not have accepted answer which can help me.
The .stringValue obtained from a AVMetadataObject scan is just that - a "string value." It is up to you to parse the content.
There are a number of predefined data types, such as
a URL, where the string starts with "https://";
an email link, e.g. "mailto:somebody#example.com?subject=Mail%20from%20Our%20Site"
There is also a "VCard" spec, which may be formatted with "field" values:
BEGIN:VCARD
VERSION:3.0
N:Owen;Sean;;;
FN:Sean Owen
TITLE:Software Engineer
EMAIL;TYPE=INTERNET;TYPE=WORK;TYPE=PREF:srowen#google.com
URL;TYPE=Homepage:https://example.com
END:VCARD
for example.
So, you check the start of the string. If it begins with "https://" your app might launch Safari. If it begins with "mailto:" you could launch the mail app. If it begins with "BEGIN:VCARD" then you'd parse the predefined fields and use the data in your app.
There is a good summary of predefined types here (although, it may be a bit out-of-date): https://github.com/zxing/zxing/wiki/Barcode-Contents
Of course, you can create your own types for your own purposes. For example, you can create a QR-Code that contains:
myTypeA:Robert
or:
myTypeB:Driver
then your app would get the string, take one action if it begins with myTypeA: and a different action if it begins with myTypeB:.

MailCore2 - Fetch message content without downloading images or attachments?

I want to provide a preview of a user's messages, but I don't wish to download attachments just in order to do that.
The information I need is:
Subject
Date
Sender information (display name if available, email address)
Plain-text message
By calling the method fetchMessagesByNumberOperationWithFolder: with request kind MCOIMAPMessagesRequestKindHeaders, I get the date and subject, but it's very slow to return if any of the messages have attachments. By calling it with request kind MCOIMAPMessagesRequestKindUid, it returns very quickly, with just the Uid (and the current date, as a placeholder). From there, I still need to get the subject, the date and the sender.
Now I'm still trying to get this information, while avoiding downloading message attachments.
Calling fetchParsedMessageOperationWithFolder: or fetchMessageOperationWithFolder: both download the message with attachments, and are thus very slow to return.
Because fetchMessageOperationWithFolder: completes with a NSData object, checking the size of the given object reveals it to be the size of a regular message, plus its' attachment.
What can I do to get the information I need, without downloading any attachments?
EDIT: Calling requiredPartsForRendering could give me the content of the email, but in order to retrieve the Date and sender information, I'd still have to have a request kind of MCOIMAPMessagesRequestKindHeaders, which would download the attachment.
So to clarify:
I want to get the following information from an IMAP email, without downloading the email attachments:
Subject
Date
Sender information (display name if available, email address)
Plain-text message
The following methods should be helpful to you:
-[MCOAbstractMessage requiredPartsForRendering] will return the message parts that you needs to fetch to be able to show the text content of the message.
-[MCOIMAPSession fetchMessageAttachmentOperationWithFolder:uid:partID:encoding:] will help you fetch each of those parts.
-[MCOIMAPMessage htmlRenderingWithFolder:delegate:] will return the rendered content as HTML (or nil if you don't provide all the content of the parts through the delegate.
-[NSString mco_flattenHTML] is also useful if you'd like to convert the HTML to a unformatted string.

special character coming when i am using & and p

I dont know what exactly i have to type in title for this ,i tried my best
anyway coming to topic
I am making one acc checker for that purpose ,i am sending user and pass from my bsskinedit1 and bsskinedit2
here is my code
s:='http:\\site.com..premlogin='+bsskinedit.text+'&password='+bsskinedit2.text
but it giving some error ,then i used showmessage whats wrong with it then i came with strange result
see below
observer after 4 & and p combining together and appearing as a some new symbol :(
can any one tell me why its coming like this ?
Your code (where you build the URL) is most likely correct (I guess the above has some typos?!), but when you display the URL in a label for instance, the & character is treated as indicator for an accelerator key.
By Windows design, accelerator keys
enable the user to access a menu
command from the keyboard by pressing
Alt along the appropriate letter,
indicated in your code by the
preceding ampersand (&). The character
after the and sign (&) appears
underlined in the menu.
If you want to display the & character itself, you have to set your string variable to &&.
By placing two ampesands together - you state that the character following the first one is not used as the accelerator - rather you actually want to get it (only one) displayed.
Just use your debugger if you want to see the real value that your string variables have, don't output them to a message box or the like... It may have side effects, as you can see.
Regarding the URL you build: I can't possibly know how it has to be correctly, but at least you should use the right slashes!
s := 'http://site.com...'
(All quotes from delphi.about.com)
In addition to what Mef said, you can use OutputDebugString to add your string to the event log in its raw form, so you don't need to modify it before displaying it. Delphi should capture those strings automatically if you're running from the debugger. If you aren't running it from Delphi you can use DebugView instead, which captures the messages from any running applications.

Resources