ThRuST Well-Known Member Licensed User Longtime User May 1, 2015 #1 (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) Anyone?
(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) Anyone?
NJDude Expert Licensed User Longtime User May 1, 2015 #2 Something like this: Code: Copy Private i As Intent i.Initialize(i.ACTION_VIEW, "sms:") i.PutExtra("sms_body", "Hello There!") StartActivity(i) Upvote 0
Something like this: Code: Copy Private i As Intent i.Initialize(i.ACTION_VIEW, "sms:") i.PutExtra("sms_body", "Hello There!") StartActivity(i)
ThRuST Well-Known Member Licensed User Longtime User May 1, 2015 #3 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? Upvote 0
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?
NJDude Expert Licensed User Longtime User May 1, 2015 #4 If you mean to intercept SMS messages then try THIS Upvote 0
ThRuST Well-Known Member Licensed User Longtime User May 1, 2015 #5 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) Perhaps you or someone else can help me solve it by looking at this page: http://developer.android.com/reference/android/telephony/SmsManager.html Upvote 0
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) Perhaps you or someone else can help me solve it by looking at this page: http://developer.android.com/reference/android/telephony/SmsManager.html
ThRuST Well-Known Member Licensed User Longtime User May 1, 2015 #6 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 based my idea on this. Maybe it gets closer to the answer. http://stackoverflow.com/questions/...es-from-the-inbox-programmatically-in-android Upvote 0
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 based my idea on this. Maybe it gets closer to the answer. http://stackoverflow.com/questions/...es-from-the-inbox-programmatically-in-android
ThRuST Well-Known Member Licensed User Longtime User May 1, 2015 #7 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 Upvote 0
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
NJDude Expert Licensed User Longtime User May 1, 2015 #8 You could also do this: Code: Copy Private i As Intent i.Initialize(i.ACTION_MAIN, "") i.SetType("vnd.android-dir/mms-sms") StartActivity(i) Upvote 0
You could also do this: Code: Copy Private i As Intent i.Initialize(i.ACTION_MAIN, "") i.SetType("vnd.android-dir/mms-sms") StartActivity(i)
ThRuST Well-Known Member Licensed User Longtime User May 1, 2015 #9 Thank you NJDude, brilliant solution Upvote 0