Hi guys, I followed this, tried both examples, went with the first one and I get a end of program with no error. No intent dialog. I confirm the file 1.png is there as you can see, and it is. What am I doing wrong?
#Region Project Attributes
#ApplicationLabel: B4A Example
#VersionCode: 1
#VersionName:
'SupportedOrientations possible values: unspecified, landscape or portrait.
#SupportedOrientations: unspecified
#CanInstallToExternalStorage: False
#End Region
#Region Activity Attributes
#FullScreen: False
#IncludeTitle: True
#End Region
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Msgbox(File.DirDefaultExternal,1)
Msgbox(File.Exists(File.DirDefaultExternal,"1.png"),"1")
Dim iIntent As Intent
iIntent.Initialize("android.intent.action.SEND_MSG", "")
iIntent.SetComponent("com.android.mms/.ui.ComposeMessageActivity")
iIntent.setType("vnd.android-dir/mms-sms")
iIntent.PutExtra("android.intent.extra.STREAM", CreateUri("file://" & File.Combine(File.DirDefaultExternal, "1.png")))
iIntent.PutExtra("sms_body", "Hello there!!!")
iIntent.PutExtra("address", "0400THEAUPHONENUMBERDIGITS")
iIntent.SetType("image/png")
StartActivity(iIntent)
End Sub
Sub CreateUri(uri As String) As Object
Dim r As Reflector
Return r.RunStaticMethod("android.net.Uri", "parse", Array As Object(uri), Array As String("java.lang.String"))
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub