what's missing, SMS sample code?

Beja

Expert
Licensed User
Longtime User
Hi Friends,

Trying to run a simple SMS example that I found somewhere, but received error.
I found this SMS example somewhere and wanted to try it, but I get
error instead.. so what's wrong?

'Service module
Sub Process_Globals
AddPermission("android.permission.SEND_SMS") (In Manifest)
Dim Sms1 As PhoneSms

'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.

End Sub
' ===========================================

Compiling code. Error
Error parsing program.
Error description: Unknown type: phonesms
Are you missing a library reference?
Occurred on line: 4
Dim Sms1 As PhoneSms
'============================================

Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Layout1")

End Sub
'============================================

Sub Button1_Click

Sms1.Send(3105551212,"Android SMS test")
Log("SMS Sent")
End Sub
=============================================

ptw: didn't find "Lib" in the IDE or the designer menus, so could not add a
phonesms library.
 
Thanks worm,
it is on the right pane though.. now that error disappeared and another one
popped up..
looking for SMS sample (Project) in the documentation, I hope to find it.
It would be great if there is a complete simple project, just to show the class
or view at work, and that can run in the emulator without modification. I tried
a few projects of this kind like hello world and myfirstprogram.. but didn't find
any for SMS or communications.. Yes there are plenty of descriptions but all assume the reader is a leader in the language.. I would suggest that when writing language docs people assume the reader is idiot and he/she knows virtually nothing about anything!!
 
Last edited:
Upvote 0
Worm,
big thanx.. I owe you one!..
imagine all this time I was thinking that this so difficult task, to send or rcv
a text message.. because I am new in this Android thing and heard about
rooting and mount un-mount permissions etc..
Now the communication issue is also solved because I will use text messages
for communicating with mControllers, there are plenty of cheap GSM chips out there you can put in any controller module.
Thanks again.
 
Upvote 0
Back
Top