iOS Question How to initiate phone call and text message in IOS

DickD

Active Member
Licensed User
I'm porting my android app to ios. I can start phone calls and text messages in android but trying to reuse the same code, shown below, in ios results in error messages. How do I do this in IOS?

B4X:
Sub CallButton_Click
Dim p As PhoneCalls
StartActivity(p.Call(PNumber))
End Sub

Sub SendMsgBtn_Click
Pstring = "From user " & ScreenName & ": " & PhoneMessageTxt.Text
Sms.Send(PNumber,Pstring)
LoadLayout
End Sub
 

DickD

Active Member
Licensed User
OK so I've created a sub which sets the phone number and message text. How do I actually send the message? In Android it was the .send command but there is no equivalent in ios.

B4X:
Dim Message as MessageCompoter

Sub [B]SendMsgBtn_Click[/B]
Message.SetRecipients(Array("123456789"))
Message.body = "Hello JanPRO"
 ... so now what?
End Sub
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,

you need to do the following:
B4X:
Message.Show(Page1)

You can't send the message directly in iOS, the MessageComposer allows you only to display the standard message interface inside your app.

Jan
 
Upvote 0

DickD

Active Member
Licensed User
Upvote 0
Top