send text code phonegap ios - ios

I need to add a "share this app via text" button to my app. I am currently using Phonegap 3.3. I use this code
share via text
This works fine for Android, but on iOS devices it doesn't pass the subject or actual content of the message though.

No, it is not possible.
The sms scheme is used to launch the Messages app. The format for URLs
of this type is “sms:”, where is an optional parameter that specifies
the target phone number of the SMS message. This parameter can contain
the digits 0 through 9 and the plus (+), hyphen (-), and period (.)
characters. The URL string must not include any message text or other
information.
Answer was taken from this Link.

It is possible, if you make a phonegap plugin that in turn uses this Native API to get the result you are looking for:
Here's a tutorial that helps too:
http://iosdevelopertips.com/core-services/how-to-send-an-sms-progammatically.html

Related

Angular 2/4 : Mobile Number Auto Detection not working in Angular2/4

Feature : "By default, Safari on iOS detects any string formatted like a phone number and makes it a link that calls the number."
Working as expected Environments : Plain HTML and Angular 1.x.
We do the same implementation in another angular 2 application . this feature is not working as expected.
Current behavior : In Angular2/4 - Safari on iOS does not detect any string formatted like a phone number and it does not make it a link(iOS Devices).
Expected behavior : By default, Safari on iOS detects any string formatted like a phone number and makes it a link that calls the number.
Please go with the below JS Fiddle URL: (Please open this URL in iOS Devices we will not see this auto detection feature)
https://jsfiddle.net/1hk7knwq/3752/

Making phone call in Australian app ios

I am currently running into an issue with Xamarin Studio and making phone calls.
I am having an issue when trying to make a call to an Australian phone number from an app that is only available in the Australian app store. I am using
UIApplication.SharedApplication.OpenUrl(new NSUrl(tel:{phoneNumber}))
but it is showing that there is nothing found that can handle the phone number. The number is in a format such as: XXXXXXXXXX. I looked over Apple's documentation about Phone links, but it only shows how to setup the format for phone numbers located in the US. I am located in the US and published the app under their account. Do I need to include the country code? or is there something else that I am missing entirely?
I know the above code is deprecated in iOS10. I am mainly concerned with why the number is not working.
Thanks for your help.
You can include the country code (+61 for Australia country code) in the phone number directly like below:
UIApplication.SharedApplication.OpenUrl(new NSUrl("tel:" + "+61123456789"));
From your example:
UIApplication.SharedApplication.OpenUrl(new NSUrl(tel:{phoneNumber}));
I assume that your phoneNumber is a parameter.
So maybe you should use:
UIApplication.SharedApplication.OpenUrl(new NSUrl("tel:" + phoneNumber));
This is a Xamarin Phone call example.

Lowercase query parameters in URL using iOS universal links

I was just about to link an app to a domain using universal links (or also refered to as associated domains; available since iOS 9). So far everything worked out and while testing with Safari I was able to open my app correctly, also parse path and query parameters of any URL.
But when I opened an URL that worked before with Safari from inside iMessage or Mail it failed.
I found out that when opening an app that way each query parameter gets reformatted to lowercase characters, which is invalid towards my data handling.
For example
https://www.example.com/path?paramNameOne=ValueOne&paramNameTwo=ValueTwo
is altered to
https://www.example.com/path?paramnameone=valueone&paramnametwo=valuetwo
So question is if there is a detail with this technology that I'm not aware of or - in case of a known bug - a propper strategy to cope with this issue.
Universal linking does not accept font formatting. Remove styling from your link and check

Swift's openURL method does not place a phone call with an Asterix sign (iOS 8.4)

I'm trying to place a PhoneCall in a swift application.
It works pretty simple with regular phone numbers using the openURL
method. However, when I try to use a string that contains an asterix (for example, dial the number (****02), the method returns false.
I've tried using string literals with no help.
Is it possible to do so at all? Thanks!
var url:NSURL = NSURL(string: "tel://****02")!
UIApplication.sharedApplication().openURL(url)
Phone Links
... To prevent users from maliciously redirecting phone calls or
changing the behavior of a phone or account, the Phone app supports
most, but not all, of the special characters in the tel scheme.
Specifically, if a URL contains the * or # characters, the Phone app
does not attempt to dial the corresponding phone number. ...
I remember reading an answer from somebody that Apple doesn't allow you to dial numbers that contain "*" or "#". If I remember the thread correctly, the rationale was that those let you do things like log in to automated phone systems, and that should be under the user's control.

App with custom URL callback and custom search URL

I'm looking for recommendations for an iOS barcode scanner app. Specifically for iPad which will support a custom URL callback to enable the app to be launched from a web browser.
Additionally, it needs to support and a custom search URL which will send the user back to the website once the barcode has been decoded into a URN (SKU).
I have discovered ZBar which is an excellent app, unfortunately it doesn't support custom URL callback and it's designed for the iPhone.
Another app pic2shop PRO seems to tick these boxes, but it's relatively expensive at £10.49 and the setup will require somewhere in the region of 200 installs.
I did a similar project using the free version of pic2shop . The thing is that the free version can read only these types of barcodes : UPC-A, UPC-E, EAN-13, EAN-8 , according to the documentation of the app.
Pic2shop is a free barcode scanner app available for iOS® and Android®. It reads UPC-A, UPC-E, EAN-13, EAN-8 and QR codes. The app also display comparison shopping results for UPC and EAN.
From my personal experience, I can say that it scans and decodes the barcode very fast and very accurate.
In my project the app is launched from a webpage, it works for both android and ios. In order to get it working you have to invoke the pic2shop app from a url and then set your callback address. You will find the decoded barcode data as a value to a parameter in the callback url. To help you more, you can get those values using this javascript function found here.
For example:
<input type=button OnClick="scan();" value="Scan Barcode">
<script>
function scan(){
window.location="pic2shop://scan?callback=http://yourwebsiteurl.com/index.html?barcode=ean"
}
</script>
As soon as the item is successfully scanned it will redirect you to the callback url with the actual barcode number as a value to a parameter. For example http://yourwebsiteurl.com/index.html?barcode=5123548745123. I already told you how to get the value of a url parameter with javascript.
PDF417.mobi Pro barcode scanner app supports that use case.
Note: I'm a developer on that project.
Basically, the app can be launched from any other app, including a web application, when url in the form: pdf417://scan?type=PDF417,UPCA&callback=myscheme://myaction is launched.
The app then scans the barcode, in multiple formats, (PDF417 and UPCA in this example), until the result is obtained.
Then, the app opens the URL myscheme://myaction. In your case, this can be your web service, http://www.somemyscanner.com/service.
Specifically, it will open the URL using format: http://www.somemyscanner.com/service?data=[data]&type=[type].
You can then use those parameters to implement your desired functionalities.
I tried the PDF417 app and it is EXTREMELY expensive (for an app - $28) and does not work. I bought it anyway because I am trying to solve the same issue and I can tell you it is not the solution for general barcode scanning.
It might work with pdf417 barcodes, but those are few and far between and I haven't been able to get it to work. I definately does not support any standard barcode formats. It also has no settings panel (in settings) and the tap target in the app that should be settings just take you to the company web site.
I am still testing other apps but haven't found any app that does what you ask, Red Laser used to but it no longer has that functionality.

Resources