Making phone call in Australian app ios - 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.

Related

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.

Phone call from Apple Watch with openSystem API?

As I watched the WWDC 2015 session video "Introducing WatchKit for watchOS 2" (at 13:29), I saw that it is possible to make phone calls directly on Apple Watch with the openSystem API. How can I use this API in Swift?
You can use the openSystemURL method, which is available on the shared WKExtension object. Pass a tel: URL to this method to initiate a phone call.
if let telURL=NSURL(string:"tel:5553478") {
let wkExtension=WKExtension.sharedExtension()
wkExtension.openSystemURL(telURL)
}
There seems to be a bug in beta 1 that is not allowing the use of openSystemURL on phone numbers. I've seen several sample projects as well as banged my own head against the wall attempting to get going. No implementation I've seen works. SMS works fine however.

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.

send text code phonegap 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

Using AddThis SDK for iOS, Need to change "via #AddThis" for default Twitter text

First ever SO question, woohoo.
I've integrated the AddThis SDK into an iOS app. I've set it up to share the App Store link to the App via various channels. All works well except the default text in the Twitter message appends "via #AddThis" to the end of the tweet. Although this text is editable by the user, I'd like to change it to "via #MyTwitterHandle".
AddThis' documentation says you can use:
[AddThisSDK setTwitterViaText:#"MyTwitterHandle"];
Except this doesn't work. It raises a warning that AddThisSDK may not respond to the method call and the app crashes when it reaches this line.
Examining the AddThisSDK header file, there's no such method outlined. I've searched their forums and FAQ etc to no avail. And I did run into other instances where the method names in their documentation were different from those in the SDK. If that's the case here I haven't found the correct name. Does anyone know how to do this?
Thanks in advance.
Do you have the latest version of the addthis iOS sdk? http://www.addthis.com/help/ios-quickstart
Please set setTwitterViaText before the sharing code.
This will work:
[AddThisSDK setTwitterViaText:#"My App"];
[AddThisSDK shareURL:myUrl withService:#"twitter" title:#"myTitle" description:myDescription];
This will not work:
[AddThisSDK shareURL:myUrl withService:#"twitter" title:#"myTitle" description:myDescription];
[AddThisSDK setTwitterViaText:#"My App"];

Resources