Can someone explain to me why I see no attachment.
heres my manifest and I know this is probably wrong:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
addPermission("android.permission.READ_EXTERNAL_STORAGE")
AddPermission("android.permission.INTERNET")
AddPermission("android.permission.WRITE_EXTERNAL_STORAGE")
AddPermission("android.permission.SEND_SMS")
AddPermission("android.permission.SEND_MMS")
AddPermission("android.permission.READ_CONTACTS")
addpermission("android.permission.RECEIVE_SMS")
AddPermission("android.permission.WRITE_CONTACTS") 'if write access is required
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddActivityText(Main,
<!-- Activity that allows the user to send new SMS/MMS messages -->
<activity android:name=".ComposeSmsActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</activity>)
B4X:
Sub Button6_Click
Dim iIntent As Intent
iIntent.setType("vnd.android-dir/mms-sms")
iIntent.PutExtra("android.intent.extra.STREAM", CreateUri("file://" & File.Combine(File.DirDefaultExternal, "FI1.JPEG")))
iIntent.PutExtra("sms_body", "Hello there!!!")
iIntent.PutExtra("address", "01234567899")
iIntent.SetType("image/JPEG")
iIntent.SetComponent(".ComposeSmsActivity")
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
heres my manifest and I know this is probably wrong:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
addPermission("android.permission.READ_EXTERNAL_STORAGE")
AddPermission("android.permission.INTERNET")
AddPermission("android.permission.WRITE_EXTERNAL_STORAGE")
AddPermission("android.permission.SEND_SMS")
AddPermission("android.permission.SEND_MMS")
AddPermission("android.permission.READ_CONTACTS")
addpermission("android.permission.RECEIVE_SMS")
AddPermission("android.permission.WRITE_CONTACTS") 'if write access is required
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.
AddActivityText(Main,
<!-- Activity that allows the user to send new SMS/MMS messages -->
<activity android:name=".ComposeSmsActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</activity>)