(B4A) Hello I wonder how to start the default SMS manager intent in android? I have tried the packagemanager without luck, but I can read email that way but not SMS.
I can access the phones settings this way, perhaps it makes it easier.
Dim intent1 As Intent
intent1.Initialize("android.settings.WIFI_SETTINGS", "")
StartActivity(intent1)
Thanks NJDude. I allready know how how to send SMS, I need to read them from intent and not any list (SMS main menu) from the SMS manager as specified in my post. Can you solve it?
I was hoping there was an intent available to access the 'SMS inbox message handler'. A running service was not really the prime answer to this question. Thanks anyway.
This is the closest I could get:
Dim intent1 As Intent
intent1.Initialize("android.provider.Telephony.SMS_RECEIVED")
StartActivity(intent1)
Hey NJDude!! I have tried to start SMS inbox handler by using the contentchooser. Please continue our quest to solve this, and the circle of power will be complete.
Dim cont As ContentChooser
cont.Initialize("")
cont.Show("content://sms/inbox","")
I solved this myself. Here's how to start the SMS inbox handler:
' Start SMS handler intent
Dim PM As PackageManager
Dim StartIntent As Intent
Dim iStr As String
Dim Packages As List
Packages = PM.GetInstalledPackages
For i = 0 To Packages.size - 1
iStr=Packages.Get(i)
If iStr.Contains("mms") = True Then
StartIntent=PM.GetApplicationIntent(iStr)
If StartIntent.IsInitialized Then StartActivity(StartIntent)
Exit
End If
Next